summaryrefslogtreecommitdiff
path: root/test/parallel/test-whatwg-url-custom-href-side-effect.js
blob: 30967d9feaef5400b84a2e913ffa188bb657fbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'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);