context.signal
-
¥Type: <AbortSignal>
可用于在测试中止时中止测试子任务。
¥Can be used to abort test subtasks when the test has been aborted.
test('top level test', async (t) => {
await fetch('some/uri', { signal: t.signal });
});
¥Type: <AbortSignal>
可用于在测试中止时中止测试子任务。
¥Can be used to abort test subtasks when the test has been aborted.
test('top level test', async (t) => {
await fetch('some/uri', { signal: t.signal });
});