You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node:test: Add suite() function to define suites #51430
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,describeassuite}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().
Activity
marco-ippolito commentedon Jan 10, 2024
What's wrong with using describe/it syntax if you need the feature they are meant for?
I'm not sure about adding an alias of describe to match test
justinfagnani commentedon Jan 10, 2024
Why have the alias of
testthen? Shoulditbe removed?test_runner: add suite()
test_runner: add suite()
test_runner: add suite()
test_runner: add suite()