-
-
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.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
What is the problem this feature will solve?
In the Node test runner (https://nodejs.org/api/test.html#test-runner) we have describe.todo
and it.todo
to designate suites/tests which do not exist yet but we're planning on adding. The describe
> it
syntax is one option of declaring tests, though, there is also just test
in the API. For those of us who prefer test
over describe
, there is no shorthand test.todo
, only the test
method todo
option: https://nodejs.org/api/test.html#testname-options-fn
What is the feature you are proposing to solve the problem?
Add test.todo
similarly to how it.todo
currently exists:
namespace it {
// Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
function skip(name?: string, options?: TestOptions, fn?: ItFn): void;
function skip(name?: string, fn?: ItFn): void;
function skip(options?: TestOptions, fn?: ItFn): void;
function skip(fn?: ItFn): void;
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
function todo(name?: string, options?: TestOptions, fn?: ItFn): void;
function todo(name?: string, fn?: ItFn): void;
function todo(options?: TestOptions, fn?: ItFn): void;
function todo(fn?: ItFn): void;
}
What alternatives have you considered?
Not doing it - we do have the test
todo
option so a shorthand is a QOL/DX improvement not a blocker of anything. I don't see the reason for why it
should have it and test
not though. Seems like parity on these would not hurt anything.
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.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.