Skip to content

Commit 4109e0e

Browse files
joyeecheungitaloacasas
authored andcommitted
test: remove WHATWG URL test data file extension
Make url-tests a js file so we can comment out incompatible tests PR-URL: #11439 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4e32770 commit 4109e0e

6 files changed

+14
-8
lines changed

test/fixtures/url-tests.json test/fixtures/url-tests.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
'use strict';
2+
3+
/* WPT Refs:
4+
https://github.com/w3c/web-platform-tests/blob/master/url/urltestdata.json
5+
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
6+
*/
7+
8+
module.exports =
19
[
210
"# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js",
3-
"License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html",
4-
"Source: https://github.com/w3c/web-platform-tests/tree/master/url",
511
{
612
"input": "http://example\t.\norg",
713
"base": "http://example.org/foo/bar",

test/known_issues/test-url-parse-conformance.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const url = require('url');
77
const assert = require('assert');
88
const path = require('path');
99

10-
const tests = require(path.join(common.fixturesDir, 'url-tests.json'));
10+
const tests = require(path.join(common.fixturesDir, 'url-tests'));
1111

1212
let failed = 0;
1313
let attempted = 0;

test/parallel/test-whatwg-url-constructor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (!common.hasIntl) {
1111
}
1212

1313
const request = {
14-
response: require(path.join(common.fixturesDir, 'url-tests.json'))
14+
response: require(path.join(common.fixturesDir, 'url-tests'))
1515
};
1616

1717
/* eslint-disable */

test/parallel/test-whatwg-url-inspect.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ if (!common.hasIntl) {
1313
}
1414

1515
// Tests below are not from WPT.
16-
const tests = require(path.join(common.fixturesDir, 'url-tests.json'));
16+
const tests = require(path.join(common.fixturesDir, 'url-tests'));
1717
const additional_tests = require(
18-
path.join(common.fixturesDir, 'url-tests-additional.js'));
18+
path.join(common.fixturesDir, 'url-tests-additional'));
1919

2020
const allTests = additional_tests.slice();
2121
for (const test of tests) {

test/parallel/test-whatwg-url-origin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (!common.hasIntl) {
1111
}
1212

1313
const request = {
14-
response: require(path.join(common.fixturesDir, 'url-tests.json'))
14+
response: require(path.join(common.fixturesDir, 'url-tests'))
1515
};
1616

1717
/* eslint-disable */

test/parallel/test-whatwg-url-parsing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (!common.hasIntl) {
1212
}
1313

1414
// Tests below are not from WPT.
15-
const tests = require(path.join(common.fixturesDir, 'url-tests.json'));
15+
const tests = require(path.join(common.fixturesDir, 'url-tests'));
1616

1717
for (const test of tests) {
1818
if (typeof test === 'string')

0 commit comments

Comments
 (0)