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.】