Closed gerbyzation closed 2 months ago
msw
v20.6.1
https://github.com/gerbyzation/msw-node20-undici-fetch-abort-repro
Setup:
git clone https://github.com/gerbyzation/msw-node20-undici-fetch-abort-repro cd msw-node20-undici-fetch-abort-repro pnpm i
To demonstrate the abort doesn't work with an MSW handler, but does work without run the two scripts below:
node not-working-abort.mjs node working-abort.mjs
Request completes without throwing an abort error
fetch should throw an abort error
fetch
I'm sure this is fixed in v2. I have no plans to backport it to v1. Please upgrade to v2 to get this fix. Thanks.
Prerequisites
Environment check
msw
versionNode.js version
v20.6.1
Reproduction repository
https://github.com/gerbyzation/msw-node20-undici-fetch-abort-repro
Reproduction steps
Setup:
To demonstrate the abort doesn't work with an MSW handler, but does work without run the two scripts below:
Current behavior
Request completes without throwing an abort error
Expected behavior
fetch
should throw an abort error