Skip to content

DOMException message not printed in node test runner #59852

@phaux

Description

@phaux

Version

22.18.0

Platform

Linux 6.16.3-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Aug 23 17:02:17 UTC 2025 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

import { test } from "node:test"

test("test", () => {
  throw new DOMException("test error msg")
})
node --test

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

Same as if Error was used:

  Error: test error msg
      at TestContext.<anonymous> ...

What do you see instead?

  {}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    v22.xIssues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.web-standardsIssues and PRs related to Web APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions