add separation of msw handlers into browser and e2e contexts, and replace the import.meta statements into the browser file since only the browser can handle esmodules

This commit is contained in:
Jacob Overgaard
2022-08-08 14:50:57 +02:00
parent 8842bf6cfa
commit fcdfec575e
6 changed files with 73 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
import { expect, test as base } from '@playwright/test';
import { createWorkerFixture } from 'playwright-msw';
import { handlers } from './src/mocks/handlers';
import { handlers } from './src/mocks/e2e-handlers';
import type { MockServiceWorker } from 'playwright-msw';
const test = base.extend<{