diff options
Diffstat (limited to 'tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js')
-rw-r--r-- | tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js new file mode 100644 index 000000000..de175e357 --- /dev/null +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js @@ -0,0 +1,22 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 18.12.1 +// This file is automatically generated by `tools/node_compat/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Tests below are not from WPT. +require('../common'); +const assert = require('assert'); + +const ref = new URL('http://example.com/path'); +const url = new URL('http://example.com/path'); +assert.throws(() => { + url.href = ''; +}, { + name: 'TypeError' +}); + +assert.deepStrictEqual(url, ref); |