Files
sousa-gecko/testing/web-platform/tests/urlpattern/urlpattern-constructor.any.js
T
Ms2ger 2d0e61823a Bug 2028580 [wpt PR 58910] - Run urlpattern-constructor in workers, a=testonly
Automatic update from web-platform-tests
Run urlpattern-constructor in workers

--

wpt-commits: f07c03cbede41ba677c3d26fd17ff3e02ba26783
wpt-pr: 58910
2026-04-17 08:35:25 +00:00

11 lines
418 B
JavaScript

// META: global=window,worker
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`);