it([name][, options][, fn])
name<string> 测试的名称,报告测试结果时显示。 默认值: Thenamefn的属性,如果fn没有名称,则为'<anonymous>'。options<Object> 套件的配置选项。 支持与test([name][, options][, fn])相同的选项。fn<Function> | <AsyncFunction> 被测试的函数。 如果测试使用回调,则回调函数作为参数传入。 默认值: 无操作的函数。- 返回:
undefined。
it() 函数是从 node:test 模块导入的值。
name<string> The name of the test, which is displayed when reporting test results. Default: Thenameproperty offn, or'<anonymous>'iffndoes not have a name.options<Object> Configuration options for the suite. supports the same options astest([name][, options][, fn]).fn<Function> | <AsyncFunction> The function under test. If the test uses callbacks, the callback function is passed as an argument. Default: A no-op function.- Returns:
undefined.
The it() function is the value imported from the node:test module.