diff --git a/client/checkout/woopay/direct-checkout/test/index.test.js b/client/checkout/woopay/direct-checkout/test/index.test.js index 245c747a1e2..c62e98aad3b 100644 --- a/client/checkout/woopay/direct-checkout/test/index.test.js +++ b/client/checkout/woopay/direct-checkout/test/index.test.js @@ -22,6 +22,7 @@ jest.mock( () => ( { init: jest.fn(), isWooPayThirdPartyCookiesEnabled: jest.fn(), + initPostMessageTimeout: jest.fn(), getCheckoutButtonElements: jest.fn(), isUserLoggedIn: jest.fn(), maybePrefetchEncryptedSessionData: jest.fn(), diff --git a/client/checkout/woopay/direct-checkout/test/woopay-direct-checkout.test.js b/client/checkout/woopay/direct-checkout/test/woopay-direct-checkout.test.js index 6d84377cd4b..452e50d976a 100644 --- a/client/checkout/woopay/direct-checkout/test/woopay-direct-checkout.test.js +++ b/client/checkout/woopay/direct-checkout/test/woopay-direct-checkout.test.js @@ -3,6 +3,10 @@ */ import WooPayDirectCheckout from '../woopay-direct-checkout'; +jest.spyOn( WooPayDirectCheckout, 'isWooPayReachable' ).mockResolvedValue( + true +); + describe( 'WooPayDirectCheckout', () => { describe( 'addRedirectToWooPayEventListener', () => { const originalLocation = window.location;