context.skip([message])


  • message <string> 可选的跳过消息。

此函数使测试的输出指示测试已跳过。 如果提供了 message,它会包含在输出中。 调用 skip() 不会终止测试函数的执行。 此函数不返回值。

test('top level test', (t) => {
  // 如果测试包含额外的逻辑,则务必返回这里。
  t.skip('this is skipped');
});
  • message <string> Optional skip message.

This function causes the test's output to indicate the test as skipped. If message is provided, it is included in the output. Calling skip() does not terminate execution of the test function. This function does not return a value.

test('top level test', (t) => {
  // Make sure to return here as well if the test contains additional logic.
  t.skip('this is skipped');
});