assert
一个对象,其方法用于配置当前进程中 TestContext
对象上的可用断言。默认情况下,node: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.
通过将通用配置代码放在预加载了 --require
或 --import
的模块中,可以将相同的配置应用于所有文件。
¥It is possible to apply the same configuration to all files by placing common
configuration code in a module
preloaded with --require
or --import
.