@@ -15,7 +15,10 @@ import { afterEach, beforeEach, expect, it, vi } from "vitest";
1515import { finalizeEvent , getPublicKey } from "nostr-tools" ;
1616import { App } from "./App" ;
1717import { createServices , type AppServices } from "./services" ;
18- import type { OpenTarget } from "../features/navigation/targets" ;
18+ import {
19+ parseOpenTarget ,
20+ type OpenTarget ,
21+ } from "../features/navigation/targets" ;
1922import { bindDeepLinks } from "../features/navigation/deep-links" ;
2023import { matchesEvent } from "../features/relay/projection" ;
2124import type { ReadFilter } from "../features/relay/events" ;
@@ -379,7 +382,7 @@ function legacyPageFixture() {
379382}
380383
381384it . each ( [ "Inbox" , "Bestie" ] ) (
382- "normalizes old %s targets in the same visit and caller, retaining scope" ,
385+ "normalizes old %s links in the same visit and caller, retaining scope" ,
383386 async ( name ) => {
384387 const current = legacyPageFixture ( ) ;
385388 await screen . findByRole ( "navigation" , { name : "Pages" } ) ;
@@ -408,10 +411,11 @@ it.each(["Inbox", "Bestie"])(
408411 route : { version : 1 , params : name } ,
409412 ...( scope !== undefined ? { scope } : { } ) ,
410413 } ;
414+ const bound = parseOpenTarget ( old ) ;
411415 let visit = "" ;
412416 let result ! : ReturnType < typeof current . navigation . open > ;
413417 act ( ( ) => {
414- result = current . navigation . open ( old ) ;
418+ result = current . navigation . open ( bound ) ;
415419 visit = current . navigation . snapshot ( ) . entry . id ;
416420 } ) ;
417421 await waitFor ( ( ) =>
0 commit comments