mirror of
https://github.com/nodejs/node.git
synced 2025-05-04 11:17:15 +00:00

This commit refactors test-whatwg-url-tojson.js to remove ESLint comments. PR-URL: https://github.com/nodejs/node/pull/12669 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
15 lines
427 B
JavaScript
15 lines
427 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const URL = require('url').URL;
|
|
const { test, assert_equals } = common.WPT;
|
|
|
|
/* WPT Refs:
|
|
https://github.com/w3c/web-platform-tests/blob/02585db/url/url-tojson.html
|
|
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
|
|
*/
|
|
test(() => {
|
|
const a = new URL('https://example.com/');
|
|
assert_equals(JSON.stringify(a), '"https://example.com/"');
|
|
});
|