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


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

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

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