suite([name][, options][, fn])


  • name <string> 测试套件的名称,在报告测试结果时显示。默认值: 如果 fn 有名称,则为 fnname 属性;如果 fn 没有名称,则为 '<anonymous>'
  • options <Object> 套件的可选配置选项。支持与 test([名称][, options][, fn]) 相同的选项。
  • fn <Function> | <AsyncFunction> 声明嵌套测试和套件的套件函数。此函数的第一个参数是一个 SuiteContext 对象。 默认值: 一个空操作函数。
  • 返回:<Promise> 立即以 undefined 完成。

suite() 函数是从 node:test 模块导入的。

【The suite() function is imported from the node:test module.】