Skip to content

Commit 9e4ab6c

Browse files
gautamarorarefack
authored andcommitted
test: add comments for whatwg-url tests
Added comments to whatwg-url tests that they should not be changed until modifications are merged upstream as per "Web Platform Tests" guidelines PR-URL: nodejs#14355 Fixes: nodejs#12793 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 69fdb47 commit 9e4ab6c

20 files changed

+59
-39
lines changed

doc/guides/writing-tests.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,12 @@ Some of the tests for the WHATWG URL implementation (named
263263
These imported tests will be wrapped like this:
264264

265265
```js
266-
/* eslint-disable */
267-
/* WPT Refs:
266+
/* The following tests are copied from WPT. Modifications to them should be
267+
upstreamed first. Refs:
268268
https://github.com/w3c/web-platform-tests/blob/8791bed/url/urlsearchparams-stringifier.html
269269
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
270270
*/
271+
/* eslint-disable */
271272

272273
// Test code
273274

test/fixtures/url-setter-tests.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
/* WPT Refs:
3+
/* The following tests are copied from WPT. Modifications to them should be
4+
upstreamed first. Refs:
45
https://github.com/w3c/web-platform-tests/blob/b30abaecf4/url/setters_tests.json
56
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
67
*/

test/fixtures/url-tests.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
/* WPT Refs:
3+
/* The following tests are copied from WPT. Modifications to them should be
4+
upstreamed first. Refs:
45
https://github.com/w3c/web-platform-tests/blob/8df7c9c215/url/urltestdata.json
56
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
67
*/

test/fixtures/url-toascii.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
/* WPT Refs:
3+
/* The following tests are copied from WPT. Modifications to them should be
4+
upstreamed first. Refs:
45
https://github.com/w3c/web-platform-tests/blob/4839a0a804/url/toascii.json
56
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
67
*/

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ const request = {
1414
response: require(path.join(common.fixturesDir, 'url-tests'))
1515
};
1616

17-
/* eslint-disable */
18-
/* WPT Refs:
17+
/* The following tests are copied from WPT. Modifications to them should be
18+
upstreamed first. Refs:
1919
https://github.com/w3c/web-platform-tests/blob/8791bed/url/url-constructor.html
2020
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
2121
*/
22+
/* eslint-disable */
2223
function runURLConstructorTests() {
2324
// var setup = async_test("Loading data…")
2425
// setup.step(function() {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ if (!common.hasIntl) {
88
const URL = require('url').URL;
99
const { test, assert_equals, assert_throws } = require('../common/wpt');
1010

11-
/* eslint-disable */
12-
/* WPT Refs:
11+
/* The following tests are copied from WPT. Modifications to them should be
12+
upstreamed first. Refs:
1313
https://github.com/w3c/web-platform-tests/blob/8791bed/url/historical.html
1414
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
1515
*/
16+
/* eslint-disable */
1617
// var objects = [
1718
// [function() { return window.location }, "location object"],
1819
// [function() { return document.createElement("a") }, "a element"],

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ const request = {
1313
response: require(path.join(common.fixturesDir, 'url-tests'))
1414
};
1515

16-
/* eslint-disable */
17-
/* WPT Refs:
16+
/* The following tests are copied from WPT. Modifications to them should be
17+
upstreamed first. Refs:
1818
https://github.com/w3c/web-platform-tests/blob/8791bed/url/url-origin.html
1919
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
2020
*/
21+
/* eslint-disable */
2122
function runURLOriginTests() {
2223
// var setup = async_test("Loading data…")
2324
// setup.step(function() {

test/parallel/test-whatwg-url-searchparams-append.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ const assert = require('assert');
55
const URLSearchParams = require('url').URLSearchParams;
66
const { test, assert_equals, assert_true } = require('../common/wpt');
77

8-
/* eslint-disable */
9-
/* WPT Refs:
8+
/* The following tests are copied from WPT. Modifications to them should be
9+
upstreamed first. Refs:
1010
https://github.com/w3c/web-platform-tests/blob/8791bed/url/urlsearchparams-append.html
1111
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
1212
*/
13+
/* eslint-disable */
1314
test(function() {
1415
var params = new URLSearchParams();
1516
params.append('a', 'b');

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ const {
88
assert_false, assert_throws, assert_array_equals
99
} = require('../common/wpt');
1010

11-
/* eslint-disable */
12-
var params; // Strict mode fix for WPT.
13-
/* WPT Refs:
11+
/* The following tests are copied from WPT. Modifications to them should be
12+
upstreamed first. Refs:
1413
https://github.com/w3c/web-platform-tests/blob/54c3502d7b/url/urlsearchparams-constructor.html
1514
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
1615
*/
16+
/* eslint-disable */
17+
var params; // Strict mode fix for WPT.
1718
test(function() {
1819
var params = new URLSearchParams();
1920
assert_equals(params + '', '');

test/parallel/test-whatwg-url-searchparams-delete.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ const { URL, URLSearchParams } = require('url');
66
const { test, assert_equals, assert_true, assert_false } =
77
require('../common/wpt');
88

9-
/* eslint-disable */
10-
/* WPT Refs:
9+
/* The following tests are copied from WPT. Modifications to them should be
10+
upstreamed first. Refs:
1111
https://github.com/w3c/web-platform-tests/blob/8791bed/url/urlsearchparams-delete.html
1212
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
1313
*/
14+
/* eslint-disable */
1415
test(function() {
1516
var params = new URLSearchParams('a=b&c=d');
1617
params.delete('a');

0 commit comments

Comments
 (0)