From c82a87f035db9ec18d17e0e1a5120fcf119efb11 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 8 Oct 2020 22:56:14 +0200 Subject: [PATCH] chore(catalog-graphql): updating package deps and using the new way to test --- plugins/catalog-graphql/src/service/client.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-graphql/src/service/client.test.ts b/plugins/catalog-graphql/src/service/client.test.ts index d8cc59d1a8..c9708af2d0 100644 --- a/plugins/catalog-graphql/src/service/client.test.ts +++ b/plugins/catalog-graphql/src/service/client.test.ts @@ -16,13 +16,11 @@ import { CatalogClient } from './client'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; +import { msw } from '@backstage/test-utils'; describe('Catalog GraphQL Module', () => { const worker = setupServer(); - - beforeAll(() => worker.listen({ onUnhandledRequest: 'error' })); - afterAll(() => worker.close()); - afterEach(() => worker.resetHandlers()); + msw.setupDefaultHandlers(worker); const baseUrl = 'http://localhost:1234';