-
-
Notifications
You must be signed in to change notification settings - Fork 732
Open
Labels
Description
We check if signal is aborted here:
Line 126 in 9c3f34c
| if (requestObject.signal.aborted) { |
and the promise gets rejected here:
Line 304 in 9c3f34c
| p.reject(error) |
import { fetch, setGlobalOrigin } from 'undici'
import assert from 'assert'
setGlobalOrigin('http://localhost:3000')
const controller = new AbortController();
const signal = controller.signal;
controller.abort();
const log = [];
await Promise.all([
fetch('../resources/data.json', { signal }).then(
() => assert_unreached("Fetch must not resolve"),
() => log.push('fetch-reject')
),
Promise.resolve().then(() => log.push('next-microtask'))
]);
assert.deepStrictEqual(log, ['fetch-reject', 'next-microtask']);Originally posted by @KhafraDev in #1664 (comment)
Reactions are currently unavailable