blob: d5ffee7053a716f04787bbfaf1f0429430484fae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
'use strict';
require('../common');
const assert = require('assert');
// One argument is required
assert.throws(() => {
URL.canParse();
}, {
code: 'ERR_MISSING_ARGS',
name: 'TypeError',
});
{
// This test is to ensure that the v8 fast api works.
for (let i = 0; i < 1e5; i++) {
assert(URL.canParse('https://www.example.com/path/?query=param#hash'));
}
}
|