namespace assert | Node.js node:test module | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:test/
default/
assertFregisterSearch the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:test/
default/
assertFregisternamespace
test.default.assertnamespace
assertAn 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.
function
register(name: string,fn: (this:
TestContext, ...args: any[]) => void): void;
Defines a new assertion function with the provided name and function. If an assertion already exists with the same name, it is overwritten.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →