diff --git a/doc/api/test.md b/doc/api/test.md index 7deac4fae1efdf..c3ea68fa4173bf 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1750,6 +1750,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`