Skip to content

Commit

Permalink
test: remove useless require('../common') from WPTs
Browse files Browse the repository at this point in the history
PR-URL: #46796
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Backport-PR-URL: #47506
  • Loading branch information
panva authored and danielleadams committed May 17, 2023
1 parent 075d9ee commit 843ecd2
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 19 deletions.
3 changes: 3 additions & 0 deletions test/wpt/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rules:
node-core/required-modules: off
node-core/require-common-first: off
1 change: 0 additions & 1 deletion test/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ For example, for the URL tests, add a file `test/wpt/test-url.js`:
```js
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('url');
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-abort.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');

const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('dom/abort');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-atob.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('html/webappapis/atob');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-blob.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('FileAPI/blob');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-broadcastchannel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('webmessaging/broadcastchannel');
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-console.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');

const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('console');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-domexception.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('webidl/ecmascript-binding/es-exceptions');
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-encoding.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');

const { WPTRunner } = require('../common/wpt');
const runner = new WPTRunner('encoding');

Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-events.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');

const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('dom/events');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('FileAPI/file');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-hr-time.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('hr-time');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-microtask-queuing.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('html/webappapis/microtask-queuing');
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-performance-timeline.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');

const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('performance-timeline');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-streams.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('streams');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-structured-clone.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('html/webappapis/structured-clone');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-timers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('html/webappapis/timers');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-url.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('url');
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-user-timing.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');

const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('user-timing');
Expand Down
1 change: 0 additions & 1 deletion test/wpt/test-wasm-webapi.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

require('../common');
const { WPTRunner } = require('../common/wpt');

const runner = new WPTRunner('wasm/webapi');
Expand Down

0 comments on commit 843ecd2

Please sign in to comment.