context.signal


新增于: v18.7.0, v16.17.0

可用于在测试中止时中止测试子任务。

\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 });
}); 

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