playwright-msw
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -5,2 +5,11 @@ # Changelog | ||
## [1.0.4](https://github.com/valendres/playwright-msw/compare/playwright-msw@1.0.3...playwright-msw@1.0.4) "playwright-msw" (2022-11-05)<a name="1.0.4"></a> | ||
### Bug Fixes | ||
* internal cookie storage isn't reset on test teardown (#30) ([8ed4504](https://github.com/valendres/playwright-msw/commits/8ed4504)) | ||
## [1.0.3](https://github.com/valendres/playwright-msw/compare/playwright-msw@1.0.2...playwright-msw@1.0.3) "playwright-msw" (2022-10-28)<a name="1.0.3"></a> | ||
@@ -7,0 +16,0 @@ |
@@ -18,2 +18,3 @@ "use strict"; | ||
yield use(server); | ||
server.resetCookieStore(); | ||
}), | ||
@@ -20,0 +21,0 @@ { |
@@ -17,2 +17,3 @@ "use strict"; | ||
const msw_1 = require("msw"); | ||
const cookies_1 = require("@mswjs/cookies"); | ||
const events_1 = __importDefault(require("events")); | ||
@@ -73,4 +74,7 @@ const emitter = new events_1.default(); | ||
}), | ||
resetCookieStore: () => { | ||
cookies_1.store.clear(); | ||
}, | ||
}; | ||
}); | ||
exports.createServer = createServer; |
@@ -5,2 +5,3 @@ import { RequestHandler } from "msw"; | ||
resetHandlers: (...customHandlers: RequestHandler[]) => Promise<void>; | ||
resetCookieStore: () => void; | ||
}; |
{ | ||
"name": "playwright-msw", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A Mock Service Worker API for Playwright.", | ||
@@ -24,3 +24,4 @@ "main": "lib/index.js", | ||
"clean": "rimraf lib", | ||
"prepack": "yarn clean && yarn build" | ||
"prepack": "yarn clean && yarn build", | ||
"test": "jest" | ||
}, | ||
@@ -31,10 +32,16 @@ "peerDependencies": { | ||
}, | ||
"dependencies": { | ||
"@mswjs/cookies": "^0.2.2" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.26.1", | ||
"@playwright/test": "^1.27.1", | ||
"@types/jest": "^29.2.0", | ||
"@types/node": "^18.8.2", | ||
"@types/rimraf": "^3.0.2", | ||
"jest": "^29.2.2", | ||
"msw": "0.47.4", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^29.0.3", | ||
"typescript": "4.7.4" | ||
} | ||
} |
@@ -184,1 +184,2 @@ <h1 align="center">Playwright MSW</h1> | ||
- `resetHandlers(...customHandlers: RequestHandler[])`: Resets request handlers to the initial list given to the createServer call, or to the explicit next request handlers list, if given. | ||
- `resetCookieStore()`: Resets MSW's internal cookie store by removing all cookies from it. |
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
17730
147
185
3
9
+ Added@mswjs/cookies@^0.2.2
+ Added@mswjs/cookies@0.2.2(transitive)
+ Added@types/set-cookie-parser@2.4.10(transitive)
+ Addedset-cookie-parser@2.7.1(transitive)