mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
66e263035a
PR-URL: https://github.com/nodejs/node/pull/11236 Ref: https://github.com/whatwg/url/pull/229 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
17 lines
467 B
JavaScript
17 lines
467 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const URL = require('url').URL;
|
|
const { test, assert_equals } = common.WPT;
|
|
|
|
/* eslint-disable */
|
|
/* 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/\"")
|
|
})
|
|
/* eslint-enable */
|