Skip to content

Commit 1e690b3

Browse files
authored
fix(canaries): remove window variable mutation (#3122)
1 parent 35d85d1 commit 1e690b3

File tree

2 files changed

+5
-194
lines changed

2 files changed

+5
-194
lines changed

canary/e2e/cypress/integration/common/shared.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,11 @@
55
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps';
66
import { escapeRegExp } from 'lodash';
77

8-
let language = 'en-US';
9-
108
Given("I'm running the example {string}", (example: string) => {
119
cy.visit(example, {
1210
// See: https://glebbahmutov.com/blog/cypress-tips-and-tricks/#control-navigatorlanguage
1311
onBeforeLoad(win) {
14-
Object.defineProperty(win.navigator, 'language', { value: language });
15-
},
16-
onLoad(contentWindow) {
17-
window = contentWindow;
12+
Object.defineProperty(win.navigator, 'language', { value: 'en-US' });
1813
},
1914
});
2015
});

canary/e2e/yarn.lock

Lines changed: 4 additions & 188 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)