Skip to content

Commit d5179ad

Browse files
sbesh91claude
andcommitted
test: Revert scope handler to unconditional intercept
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2f0fd87 commit d5179ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/router.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ describe('Router', () => {
619619
// might be a bug in Chrome's implementation:
620620
// https://github.com/WICG/navigation-api?tab=readme-ov-file#restrictions-on-firing-canceling-and-responding
621621
if (target === '_blank' || target === '_BLANK' || target === 'custom') return;
622-
622+
623623
scratch.querySelector(`#${createId(target)}`).click();
624624
await sleep(1);
625625
expect(triedToNavigate).to.be.true;
@@ -644,10 +644,10 @@ describe('Router', () => {
644644

645645
let triedToNavigate = false;
646646
const handler = (e) => {
647+
e.intercept();
647648
if (e['preact-iso-ignored']) {
648649
triedToNavigate = true;
649650
}
650-
if (e.canIntercept) e.intercept();
651651
}
652652

653653
it('should support the `scope` prop (string)', async () => {

0 commit comments

Comments
 (0)