From a4591a59b7ece7ef863621d8eeb23a3afc57f18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Sat, 30 Nov 2024 12:08:20 +0100 Subject: [PATCH] Update `fetch` ADR regarding `msw` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/architecture-decisions/adr014-use-fetch.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/architecture-decisions/adr014-use-fetch.md b/docs/architecture-decisions/adr014-use-fetch.md index 9fdcb1967d..8454e69e7c 100644 --- a/docs/architecture-decisions/adr014-use-fetch.md +++ b/docs/architecture-decisions/adr014-use-fetch.md @@ -76,3 +76,5 @@ export class MyClient { We will gradually transition away from third party `fetch` replacement packages such as `node-fetch` and others on the Node.js platform. + +The `@mswjs/interceptors` library as used by `msw` version 1.x [does not support native fetch properly](https://github.com/mswjs/msw/issues/1563#issuecomment-1694249010) and likely never will. When you switch to using native fetch, you may see `msw` based tests start to fail to both capture and block traffic. Certain tests may need to be rewritten to use `msw` 2.x or newer instead, which uses a newer version of the interceptors.