Files
node/test/fixtures/wpt/urlpattern/urlpattern-empty-regexp-group.html
T
2026-06-29 10:21:42 +00:00

13 lines
412 B
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_throws_js(TypeError, () => { new URLPattern({ pathname: '()' }); });
}, `URLPattern rejects an empty regexp group '()' with a TypeError`);
test(() => {
new URLPattern({ pathname: '(a)' });
}, `URLPattern accepts a non-empty regexp group '(a)'`);
</script>