diff --git a/test/fixtures/url-tests.json b/test/fixtures/url-tests.js similarity index 99% rename from test/fixtures/url-tests.json rename to test/fixtures/url-tests.js index fb286ed91fcbd7..a762f8213c9135 100644 --- a/test/fixtures/url-tests.json +++ b/test/fixtures/url-tests.js @@ -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", diff --git a/test/known_issues/test-url-parse-conformance.js b/test/known_issues/test-url-parse-conformance.js index f7fcec821c8e50..62c36da87e6678 100644 --- a/test/known_issues/test-url-parse-conformance.js +++ b/test/known_issues/test-url-parse-conformance.js @@ -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; diff --git a/test/parallel/test-whatwg-url-constructor.js b/test/parallel/test-whatwg-url-constructor.js index ffcc022d3149b5..3b567f4a9439e0 100644 --- a/test/parallel/test-whatwg-url-constructor.js +++ b/test/parallel/test-whatwg-url-constructor.js @@ -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 */ diff --git a/test/parallel/test-whatwg-url-inspect.js b/test/parallel/test-whatwg-url-inspect.js index 4c6c8771b9f8f4..4afbbc13102905 100644 --- a/test/parallel/test-whatwg-url-inspect.js +++ b/test/parallel/test-whatwg-url-inspect.js @@ -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) { diff --git a/test/parallel/test-whatwg-url-origin.js b/test/parallel/test-whatwg-url-origin.js index 1186a1d1844147..c7126585e170e7 100644 --- a/test/parallel/test-whatwg-url-origin.js +++ b/test/parallel/test-whatwg-url-origin.js @@ -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 */ diff --git a/test/parallel/test-whatwg-url-parsing.js b/test/parallel/test-whatwg-url-parsing.js index 6775f79746a57d..e4f8306ead8d87 100644 --- a/test/parallel/test-whatwg-url-parsing.js +++ b/test/parallel/test-whatwg-url-parsing.js @@ -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')