diff options
author | Chemi Atlow <chemi@testim.io> | 2023-05-15 08:23:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 05:23:22 +0000 |
commit | 8b3777d0c82c01229e724d84586fdc472fd4deda (patch) | |
tree | 16c5b5a94d2eae1643c122ecbea67c18d8bdd5de /doc/api | |
parent | 3ef17b635653d0f862a093a50d611b18577348c2 (diff) | |
download | node-new-8b3777d0c82c01229e724d84586fdc472fd4deda.tar.gz |
test_runner: add shorthands to `test`
PR-URL: https://github.com/nodejs/node/pull/47909
Fixes: https://github.com/nodejs/node/issues/47897
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/test.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/api/test.md b/doc/api/test.md index 010c8850a3..a72a209c7d 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -789,6 +789,9 @@ added: - v18.0.0 - v16.17.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/47909 + description: Added the `skip`, `todo`, and `only` shorthands. - version: - v18.8.0 - v16.18.0 @@ -864,6 +867,21 @@ The `timeout` option can be used to fail the test if it takes longer than canceling tests because a running test might block the application thread and thus prevent the scheduled cancellation. +## `test.skip([name][, options][, fn])` + +Shorthand for skipping a test, +same as [`test([name], { skip: true }[, fn])`][it options]. + +## `test.todo([name][, options][, fn])` + +Shorthand for marking a test as `TODO`, +same as [`test([name], { todo: true }[, fn])`][it options]. + +## `test.only([name][, options][, fn])` + +Shorthand for marking a test as `only`, +same as [`test([name], { only: true }[, fn])`][it options]. + ## `describe([name][, options][, fn])` * `name` {string} The name of the suite, which is displayed when reporting test |