-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
What is the problem this feature will solve?
Right now the node:test docs talk about suites, and include classes like SuiteContext
, but the only way to define suites is with the describe()
BDD-style function.
While the docs point out that "it
is a shorthand for test()
", there isn't yet a suite()
function that describe()
is a shorthand for.
Grouping tests with test()
isn't the same, since that requires awaiting the subtests, which suites don't require.
What is the feature you are proposing to solve the problem?
Add a test()
export that describe()
is a shorthand for, like how it()
is for test()
.
What alternatives have you considered?
import {test, describe as suite} from 'node:test';
However this doesn't address the issue that there's a missing correspondence between the typical describe/it and suite/test APIs, or that currently suites are a first-class concept, but only available via describe()
.
aomarks, tao-cumplido, bivens-dev and BoscoDomingo
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.