Skip to content

impossible to use spec test reporter without new #50176

Closed
@mcollina

Description

@mcollina

Version

v18.18.1 and v20.8.0

Platform

all

Subsystem

node:test

What steps will reproduce the bug?

const { spec } = require('node:test/reporters');
const { run } = require('node:test');
const path = require('node:path');

run({ files: [path.resolve('./tests/test.js')] })
  .compose(spec)
  .pipe(process.stdout);

Nothing gets printed.

Instead, the following works:

const { spec } = require('node:test/reporters');
const { run } = require('node:test');
const path = require('node:path');

run({ files: [path.resolve('./tests/test.js')] })
  .compose(new spec)
  .pipe(process.stdout);

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

all the time.

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

No response

What do you see instead?

No output without new

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.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