Skip to content

Commit d564580

Browse files
jhildenbiddlesy-records
authored andcommitted
Reset Playwright context instead of page
1 parent caff169 commit d564580

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

test/config/jest-playwright.setup-tests.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ beforeAll(async () => {
4141
});
4242

4343
beforeEach(async () => {
44-
await global.jestPlaywright.resetPage();
44+
await global.jestPlaywright.resetContext();
4545

4646
// Goto URL ()
4747
// https://playwright.dev/#path=docs%2Fapi.md&q=pagegotourl-options
@@ -51,9 +51,4 @@ beforeEach(async () => {
5151
// to fail (e.g. AJAX requests). To avoid these issues, this hook ensures
5252
// that each tests begins by a blank HTML page.
5353
await page.goto(BLANK_URL);
54-
55-
// Clear local storage
56-
await page.evaluate(() => {
57-
window.localStorage.clear();
58-
});
5954
});

0 commit comments

Comments
 (0)