chore(catalog-graphql): moving to the new msw test util helper
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user