Automatic update from web-platform-tests WebKit export of https://bugs.webkit.org/show_bug.cgi?id=316976 (#60702) -- wpt-commits: 11a459a2b1d411506d9230edf9f2ef32babfeb0b wpt-pr: 60702
13 lines
412 B
HTML
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>
|