chore(catalog-graphql): moving to the new msw test util helper

This commit is contained in:
blam
2020-10-07 17:20:51 +02:00
parent fdf090b57f
commit ec1ee64b73
2 changed files with 3 additions and 3 deletions
+1
View File
@@ -33,6 +33,7 @@
},
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.24",
"@backstage/test-utils": "^0.1.1-alpha.24",
"@graphql-codegen/cli": "^1.17.7",
"@graphql-codegen/typescript": "^1.17.7",
"@graphql-codegen/typescript-resolvers": "^1.17.7",
@@ -21,6 +21,7 @@ import { setupServer } from 'msw/node';
import { ConfigReader } from '@backstage/config';
import { ReaderEntity } from '../service/client';
import { createLogger } from 'winston';
import { msw } from '@backstage/test-utils';
import { gql } from 'apollo-server';
describe('Catalog Module', () => {
@@ -37,9 +38,7 @@ describe('Catalog Module', () => {
},
]);
beforeAll(() => worker.listen({ onUnhandledRequest: 'error' }));
afterAll(() => worker.close());
afterEach(() => worker.resetHandlers());
msw.setupDefaultHandlers(worker);
describe('Default Entity', () => {
beforeEach(() => {