From 6dea41321444b2d951c6bb10fa87bc6fda36a373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 31 May 2024 09:43:12 +0200 Subject: [PATCH] Revert "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, 6 insertions(+), 3 deletions(-) diff --git a/plugins/proxy-backend/src/service/router.credentials.test.ts b/plugins/proxy-backend/src/service/router.credentials.test.ts index 0bfaa7f40a..54c865ba11 100644 --- a/plugins/proxy-backend/src/service/router.credentials.test.ts +++ b/plugins/proxy-backend/src/service/router.credentials.test.ts @@ -18,7 +18,11 @@ import { authServiceFactory, httpAuthServiceFactory, } from '@backstage/backend-app-api'; -import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; +import { + mockServices, + setupRequestMockHandlers, + startTestBackend, +} from '@backstage/backend-test-utils'; import { ResponseError } from '@backstage/errors'; import { JsonObject } from '@backstage/types'; import { HttpResponse, http, passthrough } from 'msw'; @@ -30,8 +34,7 @@ import fetch from 'node-fetch'; describe('credentials', () => { const worker = setupServer(); - beforeAll(() => worker.listen({ onUnhandledRequest: 'error' })); - afterEach(() => worker.resetHandlers()); + setupRequestMockHandlers(worker); it('handles all valid credentials settings', async () => { const config = {