Skip to content

Using node:test with Custom ESM Loaders #46292

Closed
@shanewholloway

Description

@shanewholloway

What is the problem this feature will solve?

The builtin node:test functionality does not accommodate Custom ESM Loaders for specifying tests. The documented test-runner-execution-mode only matches .js | .cjs | .mjs extension files.

What is the feature you are proposing to solve the problem?

Ideally, the test-runner-execution-mode would allow for registered Custom ESM Loaders automatically. If not possible, specifying allowed file extensions via environment variable would work.

What alternatives have you considered?

Current workaround is a manual shim -- using a standard file extension and importing the Custom ESM modules from there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions