From 530e4d1a045dec7bf31f509fd9269a134dd996d7 Mon Sep 17 00:00:00 2001 From: Alejo L Date: Mon, 1 Jul 2024 13:30:24 +1000 Subject: [PATCH] resolve due to failing tests --- packages/passport/sdk/src/confirmation/confirmation.test.ts | 2 +- packages/passport/sdk/src/confirmation/popup.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/passport/sdk/src/confirmation/confirmation.test.ts b/packages/passport/sdk/src/confirmation/confirmation.test.ts index 6a125810a2..e6d1b4f78a 100644 --- a/packages/passport/sdk/src/confirmation/confirmation.test.ts +++ b/packages/passport/sdk/src/confirmation/confirmation.test.ts @@ -13,7 +13,7 @@ let windowSpy: SpyInstance; const closeMock = jest.fn(); const postMessageMock = jest.fn(); const mockNewWindow = { - closed: false, focus: jest.fn(), close: closeMock, location: { href: 'http' }, postMessage: postMessageMock, + closed: true, focus: jest.fn(), close: closeMock, location: { href: 'http' }, postMessage: postMessageMock, }; const mockedOpen = jest.fn().mockReturnValue(mockNewWindow); const addEventListenerMock = jest.fn(); diff --git a/packages/passport/sdk/src/confirmation/popup.ts b/packages/passport/sdk/src/confirmation/popup.ts index 4622bd8857..7230eaf4ef 100644 --- a/packages/passport/sdk/src/confirmation/popup.ts +++ b/packages/passport/sdk/src/confirmation/popup.ts @@ -32,7 +32,7 @@ export const openPopupCenter = ({ left=${left} `, ); - if (!newWindow || newWindow.closed) { + if (!newWindow) { throw new Error('Failed to open confirmation screen'); }