From 65b11c1f80d20123276f7d2e12f4258fcc53a554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 30 May 2024 17:08:44 +0200 Subject: [PATCH] attempt to fix the `_a.destroy is not a function` error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .../proxy-backend/src/service/router.credentials.test.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/proxy-backend/src/service/router.credentials.test.ts b/plugins/proxy-backend/src/service/router.credentials.test.ts index 54c865ba11..0bfaa7f40a 100644 --- a/plugins/proxy-backend/src/service/router.credentials.test.ts +++ b/plugins/proxy-backend/src/service/router.credentials.test.ts @@ -18,11 +18,7 @@ import { authServiceFactory, httpAuthServiceFactory, } from '@backstage/backend-app-api'; -import { - mockServices, - setupRequestMockHandlers, - startTestBackend, -} from '@backstage/backend-test-utils'; +import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; import { ResponseError } from '@backstage/errors'; import { JsonObject } from '@backstage/types'; import { HttpResponse, http, passthrough } from 'msw'; @@ -34,7 +30,8 @@ import fetch from 'node-fetch'; describe('credentials', () => { const worker = setupServer(); - setupRequestMockHandlers(worker); + beforeAll(() => worker.listen({ onUnhandledRequest: 'error' })); + afterEach(() => worker.resetHandlers()); it('handles all valid credentials settings', async () => { const config = {