context.signal


  • <AbortSignal> 可在测试已被中止时用于中止测试子任务。
test('top level test', async (t) => {
  await fetch('some/uri', { signal: t.signal });
});