事件:'test:pass'
¥Event: 'test:pass'
-
data<Object>-
column<number> | <undefined> 定义测试的列号,如果测试是通过 REPL 运行的,则为undefined。¥
column<number> | <undefined> The column number where the test is defined, orundefinedif the test was run through the REPL. -
details<Object> 额外的执行元数据。¥
details<Object> Additional execution metadata.-
duration_ms<number> 以毫秒为单位的测试持续时间。¥
duration_ms<number> The duration of the test in milliseconds. -
type<string> | <undefined> 测试的类型,用于指示这是否是一个套件。¥
type<string> | <undefined> The type of the test, used to denote whether this is a suite.
-
-
file<string> | <undefined> 测试文件的路径,如果测试是通过 REPL 运行的,则为undefined。¥
file<string> | <undefined> The path of the test file,undefinedif test was run through the REPL. -
line<number> | <undefined> 定义测试的行号,如果测试是通过 REPL 运行的,则为undefined。¥
line<number> | <undefined> The line number where the test is defined, orundefinedif the test was run through the REPL. -
name<string> 测试名称。¥
name<string> The test name. -
nesting<number> 测试的嵌套级别。¥
nesting<number> The nesting level of the test. -
testNumber<number> 测试的序号。¥
testNumber<number> The ordinal number of the test. -
todo<string> | <boolean> | <undefined> 如果调用context.todo,则存在¥
todo<string> | <boolean> | <undefined> Present ifcontext.todois called -
skip<string> | <boolean> | <undefined> 如果调用context.skip,则存在¥
skip<string> | <boolean> | <undefined> Present ifcontext.skipis called
-
测试通过时触发。该事件保证按照测试定义的顺序触发。对应的执行命令事件为 'test:complete'。
¥Emitted when a test passes.
This event is guaranteed to be emitted in the same order as the tests are
defined.
The corresponding execution ordered event is 'test:complete'.