test: remove WHATWG URL test data file extension
Make url-tests a js file so we can comment out incompatible tests PR-URL: https://github.com/nodejs/node/pull/11439 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
3e6f1032a4
commit
795e4fd66d
@ -1,7 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
/* WPT Refs:
|
||||
https://github.com/w3c/web-platform-tests/blob/master/url/urltestdata.json
|
||||
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
|
||||
*/
|
||||
|
||||
module.exports =
|
||||
[
|
||||
"# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js",
|
||||
"License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html",
|
||||
"Source: https://github.com/w3c/web-platform-tests/tree/master/url",
|
||||
{
|
||||
"input": "http://example\t.\norg",
|
||||
"base": "http://example.org/foo/bar",
|
@ -7,7 +7,7 @@ const url = require('url');
|
||||
const assert = require('assert');
|
||||
const path = require('path');
|
||||
|
||||
const tests = require(path.join(common.fixturesDir, 'url-tests.json'));
|
||||
const tests = require(path.join(common.fixturesDir, 'url-tests'));
|
||||
|
||||
let failed = 0;
|
||||
let attempted = 0;
|
||||
|
@ -11,7 +11,7 @@ if (!common.hasIntl) {
|
||||
}
|
||||
|
||||
const request = {
|
||||
response: require(path.join(common.fixturesDir, 'url-tests.json'))
|
||||
response: require(path.join(common.fixturesDir, 'url-tests'))
|
||||
};
|
||||
|
||||
/* eslint-disable */
|
||||
|
@ -13,9 +13,9 @@ if (!common.hasIntl) {
|
||||
}
|
||||
|
||||
// Tests below are not from WPT.
|
||||
const tests = require(path.join(common.fixturesDir, 'url-tests.json'));
|
||||
const tests = require(path.join(common.fixturesDir, 'url-tests'));
|
||||
const additional_tests = require(
|
||||
path.join(common.fixturesDir, 'url-tests-additional.js'));
|
||||
path.join(common.fixturesDir, 'url-tests-additional'));
|
||||
|
||||
const allTests = additional_tests.slice();
|
||||
for (const test of tests) {
|
||||
|
@ -11,7 +11,7 @@ if (!common.hasIntl) {
|
||||
}
|
||||
|
||||
const request = {
|
||||
response: require(path.join(common.fixturesDir, 'url-tests.json'))
|
||||
response: require(path.join(common.fixturesDir, 'url-tests'))
|
||||
};
|
||||
|
||||
/* eslint-disable */
|
||||
|
@ -12,7 +12,7 @@ if (!common.hasIntl) {
|
||||
}
|
||||
|
||||
// Tests below are not from WPT.
|
||||
const tests = require(path.join(common.fixturesDir, 'url-tests.json'));
|
||||
const tests = require(path.join(common.fixturesDir, 'url-tests'));
|
||||
|
||||
for (const test of tests) {
|
||||
if (typeof test === 'string')
|
||||
|
Loading…
x
Reference in New Issue
Block a user