'test:pass' 事件
data
<Object>details
<Object> 额外的执行元数据。duration
<number> 以毫秒为单位的测试持续时间。
file
<string> | <undefined> 测试文件的路径,如果测试未通过文件运行则未定义。name
<string> 测试名称。nesting
<number> 测试的嵌套级别。testNumber
<number> 测试的序号。todo
<string> | <boolean> | <undefined> 如果调用context.todo
,则存在skip
<string> | <boolean> | <undefined> 如果调用context.skip
,则存在
测试通过时触发。
data
<Object>details
<Object> Additional execution metadata.duration
<number> The duration of the test in milliseconds.
file
<string> | <undefined> The path of the test file, undefined if test is not ran through a file.name
<string> The test name.nesting
<number> The nesting level of the test.testNumber
<number> The ordinal number of the test.todo
<string> | <boolean> | <undefined> Present ifcontext.todo
is calledskip
<string> | <boolean> | <undefined> Present ifcontext.skip
is called
Emitted when a test passes.