From 823bd0533a1fc215960d2352b5f68fb10f311263 Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Fri, 20 Oct 2023 11:01:15 +0200 Subject: [PATCH] chore: move jsdom AbortSignal test to regressions --- .../jsom-abort-signal-error.test.ts} | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename test/node/{msw-api/many-request-handlers.test.ts => regressions/jsom-abort-signal-error.test.ts} (81%) diff --git a/test/node/msw-api/many-request-handlers.test.ts b/test/node/regressions/jsom-abort-signal-error.test.ts similarity index 81% rename from test/node/msw-api/many-request-handlers.test.ts rename to test/node/regressions/jsom-abort-signal-error.test.ts index ecdd4d793..c2c81c2a6 100644 --- a/test/node/msw-api/many-request-handlers.test.ts +++ b/test/node/regressions/jsom-abort-signal-error.test.ts @@ -1,5 +1,12 @@ /** - * @jest-environment node + * @jest-environment jsdom + * + * @note In JSDOM, the "AbortSignal" class is polyfilled instead of + * using the Node.js global. Because of that, its instances won't + * pass the instance check of "require('event').setMaxListeners" + * (that's based on the internal Node.js symbol), resulting in + * an exception. + * @see https://github.com/mswjs/msw/pull/1779 */ import { graphql, http, HttpResponse } from 'msw' import { setupServer } from 'msw/node'