Skip to content

Commit fd24c1b

Browse files
committed
Fix TypeScript errors in hub-api-ts test
1 parent 38ef7b6 commit fd24c1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

starters/hub-api-ts/src/tests/hub-api.browser.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ it('opens Hub popup and verifies it loads the Hub interface', async () => {
3232

3333
// Override window.open to capture the popup reference
3434
const originalOpen = window.open
35-
window.open = function (...args: Parameters<typeof window.open>) {
35+
window.open = function (...args: Parameters<typeof window.open>): Window | null {
3636
const url = args[0]?.toString() || ''
3737

3838
// Check if it's the Hub
@@ -41,12 +41,12 @@ it('opens Hub popup and verifies it loads the Hub interface', async () => {
4141
hubPopupUrl = url
4242

4343
// Actually open the popup so we can inspect it
44-
hubPopup = originalOpen.apply(window, args)
44+
hubPopup = originalOpen.apply(window, args) as Window | null
4545
return hubPopup
4646
}
4747

48-
return originalOpen.apply(window, args)
49-
} as typeof window.open
48+
return originalOpen.apply(window, args) as Window | null
49+
}
5050

5151
// Import and initialize the app
5252
await import('../main')

0 commit comments

Comments
 (0)