-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Affected URL(s)
https://nodejs.org/api/test.html#test-reporters
Description of the problem
When importing spec
test reporter, you need to instantiate it otherwise you will get no output, for example
import { run } from "node:test";
import { tap, spec } from "node:test/reporters";
import { resolve } from "path";
const files = [resolve("./test/test.js")];
run({
files,
concurrency: 1,
timeout: 10000,
})
--- .compose(spec)
+++.compose(new spec())
.pipe(process.stdout);
Documentation should indicate that spec
reporter is exported as a class unlike tap
and dot
reporters.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.