playwright-msw
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -27,2 +27,3 @@ import { RequestHandler, Path } from 'msw'; | ||
private setRouteData; | ||
private handleInitialRequest; | ||
} |
@@ -35,2 +35,3 @@ "use strict"; | ||
this.config = Object.assign(Object.assign({}, config_1.DEFAULT_CONFIG), (config !== null && config !== void 0 ? config : {})); | ||
this.handleInitialRequest = this.handleInitialRequest.bind(this); | ||
} | ||
@@ -45,5 +46,3 @@ start() { | ||
} | ||
this.page.on('load', () => { | ||
this.isPageLoaded = true; | ||
}); | ||
this.page.on('requestfinished', this.handleInitialRequest); | ||
this.isStarted = true; | ||
@@ -139,3 +138,7 @@ }); | ||
} | ||
handleInitialRequest() { | ||
this.isPageLoaded = true; | ||
this.page.removeListener('requestfinished', this.handleInitialRequest); | ||
} | ||
} | ||
exports.Router = Router; |
{ | ||
"name": "playwright-msw", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "A Mock Service Worker API for Playwright.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -105,3 +105,3 @@ <h1 align="center">Playwright MSW</h1> | ||
The final step is to use the extended `test` implementation within your playwright tests. e.g. within a [demo.spec.ts](https://github.com/valendres/playwright-msw/blob/main/packages/example/tests/playwright/specs/demo.spec.ts) file: | ||
The final step is to use the extended `test` implementation within your playwright tests. e.g. within a [rest.spec.ts](https://github.com/valendres/playwright-msw/blob/main/packages/example/tests/playwright/specs/rest.spec.ts) file: | ||
@@ -108,0 +108,0 @@ ```typescript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30290
379