node/test/parallel/test-whatwg-url-tojson.js
Joyee Cheung 9f7b54945e Revert "test: remove eslint comments"
This reverts commit 8d1f15bf99
to preserve the original WPT code.

PR-URL: https://github.com/nodejs/node/pull/12743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-02 22:55:39 +08:00

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 */