@@ -58,7 +58,11 @@ describe("resolveVapidKeys", () => {
5858 const keys = await resolveVapidKeys ( tmpDir ) ;
5959 expect ( keys . publicKey ) . toBe ( "test-public-key-base64url" ) ;
6060 expect ( keys . privateKey ) . toBe ( "test-private-key-base64url" ) ;
61- expect ( keys . subject ) . toMatch ( / ^ m a i l t o : / ) ;
61+ expect ( keys . subject ) . toBe ( "https://openclaw.ai" ) ;
62+ const persistedKeys = JSON . parse (
63+ await fs . readFile ( path . join ( tmpDir , "push" , "vapid-keys.json" ) , "utf8" ) ,
64+ ) as { subject ?: string } ;
65+ expect ( persistedKeys . subject ) . toBe ( "https://openclaw.ai" ) ;
6266
6367 // Second call returns same keys.
6468 const keys2 = await resolveVapidKeys ( tmpDir ) ;
@@ -211,7 +215,7 @@ describe("sending", () => {
211215 expect ( result . ok ) . toBe ( true ) ;
212216 expect ( vi . mocked ( webPush . setVapidDetails ) ) . toHaveBeenCalledTimes ( 1 ) ;
213217 expect ( vi . mocked ( webPush . setVapidDetails ) ) . toHaveBeenCalledWith (
214- "mailto: openclaw@localhost " ,
218+ "https:// openclaw.ai " ,
215219 "test-public-key-base64url" ,
216220 "test-private-key-base64url" ,
217221 ) ;
0 commit comments