diff --git a/doc/api/test.md b/doc/api/test.md index 4aeec3b4593eb8..2a41055d794409 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1748,6 +1748,29 @@ describe('tests', async () => { }); ``` +## `assert` + + + +An object whose methods are used to configure available assertions on the +`TestContext` objects in the current process. The methods from `node:assert` +and snapshot testing functions are available by default. + +It is possible to apply the same configuration to all files by placing common +configuration code in a module +preloaded with `--require` or `--import`. + +### `assert.register(name, fn)` + + + +Defines a new assertion function with the provided name and function. If an +assertion already exists with the same name, it is overwritten. + ## `snapshot`