Skip to content

Commit

Permalink
Fix Jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lovo-h committed Jul 5, 2024
1 parent 9bbc705 commit 34451a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/checkout/woopay/direct-checkout/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jest.mock(
() => ( {
init: jest.fn(),
isWooPayThirdPartyCookiesEnabled: jest.fn(),
initPostMessageTimeout: jest.fn(),
getCheckoutButtonElements: jest.fn(),
isUserLoggedIn: jest.fn(),
maybePrefetchEncryptedSessionData: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
*/
import WooPayDirectCheckout from '../woopay-direct-checkout';

jest.spyOn( WooPayDirectCheckout, 'isWooPayReachable' ).mockResolvedValue(
true
);

describe( 'WooPayDirectCheckout', () => {
describe( 'addRedirectToWooPayEventListener', () => {
const originalLocation = window.location;
Expand Down

0 comments on commit 34451a6

Please sign in to comment.