chore/cli: Replace msw with setupRequestMockHandlers

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-10-26 10:38:13 +02:00
parent 2ba4a2caef
commit f1e96dc5b1
29 changed files with 74 additions and 57 deletions
@@ -19,12 +19,15 @@ import { ThemeProvider } from '@material-ui/core';
import { lightTheme } from '@backstage/theme';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { msw, renderInTestApp } from '@backstage/test-utils';
import {
setupRequestMockHandlers,
renderInTestApp,
} from '@backstage/test-utils';
describe('ExampleComponent', () => {
const server = setupServer();
// Enable sane handlers for network requests
msw.setupDefaultHandlers(server);
setupRequestMockHandlers(server);
// setup mock response
beforeEach(() => {