事件:'test:diagnostic'


\Event: 'test:diagnostic'

  • data <Object>

    • column <number> | <undefined> 定义测试的列号,如果测试是通过 REPL 运行的,则为 undefined

      \column <number> | <undefined> The column number where the test is defined, or undefined if the test was run through the REPL.

    • file <string> | <undefined> 测试文件的路径,如果测试是通过 REPL 运行的,则为 undefined

      \file <string> | <undefined> The path of the test file, undefined if test was run through the REPL.

    • line <number> | <undefined> 定义测试的行号,如果测试是通过 REPL 运行的,则为 undefined

      \line <number> | <undefined> The line number where the test is defined, or undefined if the test was run through the REPL.

    • message <string> 诊断消息。

      \message <string> The diagnostic message.

    • nesting <number> 测试的嵌套级别。

      \nesting <number> The nesting level of the test.

调用 context.diagnostic 时触发。该事件保证按照测试定义的顺序触发。

\Emitted when context.diagnostic is called. This event is guaranteed to be emitted in the same order as the tests are defined.

AltStyle によって変換されたページ (->オリジナル) /