We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3daf508 commit 76a9634Copy full SHA for 76a9634
test/common/wpt.js
@@ -484,9 +484,7 @@ class WPTRunner {
484
pretendGlobalThisAs(name) {
485
switch (name) {
486
case 'Window': {
487
- this.globalThisInitScripts.push(
488
- `global.Window = Object.getPrototypeOf(globalThis).constructor;
489
- self.GLOBAL.isWorker = () => false;`);
+ this.globalThisInitScripts.push('globalThis.Window = Object.getPrototypeOf(globalThis).constructor;');
490
this.loadLazyGlobals();
491
break;
492
}
test/wpt/test-hr-time.js
@@ -5,6 +5,9 @@ const { WPTRunner } = require('../common/wpt');
5
6
const runner = new WPTRunner('hr-time');
7
8
+runner.setInitScript(`
9
+ self.GLOBAL.isWorker = () => false;
10
+`);
11
runner.pretendGlobalThisAs('Window');
12
13
runner.runJsTests();
0 commit comments