node/test/fixtures/wpt/urlpattern/urlpattern-constructor.html
Node.js GitHub Bot e7f6cbb83d
test: update WPT for urlpattern to 84b75f0880
PR-URL: https://github.com/nodejs/node/pull/58785
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-06-26 01:50:54 +00:00

14 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>