mirror of https://github.com/nodejs/node.git
15 lines
529 B
HTML
15 lines
529 B
HTML
<!DOCTYPE html>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script>
|
|
test(() => {
|
|
assert_throws_js(TypeError, () => { new URLPattern(new URL('https://example.org/%(')); } );
|
|
assert_throws_js(TypeError, () => { new URLPattern(new URL('https://example.org/%((')); } );
|
|
assert_throws_js(TypeError, () => { new URLPattern('(\\'); } );
|
|
}, `Test unclosed token`);
|
|
|
|
test(() => {
|
|
new URLPattern(undefined, undefined);
|
|
}, `Test constructor with undefined`);
|
|
</script>
|