Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix failing express payment method unit test (#7165)
Browse files Browse the repository at this point in the history
  • Loading branch information
opr authored and alexflorisca committed Sep 28, 2022
1 parent ca0faad commit d4c500a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/js/data/payment-methods/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import {
CheckoutExpressPayment,
SavedPaymentMethodOptions,
} from '../../../blocks/cart-checkout-shared/payment-methods';
import { defaultCartState } from '../../../data/cart/default-state';
import { checkPaymentMethodsCanPay } from '../../payment-methods/check-payment-methods';
import { defaultCartState } from '../../cart/default-state';

const originalSelect = jest.requireActual( '@wordpress/data' ).select;
jest.spyOn( wpDataFunctions, 'select' ).mockImplementation( ( storeName ) => {
Expand Down Expand Up @@ -131,6 +132,8 @@ const registerMockPaymentMethods = ( savedCards = true ) => {
},
} );
} );
checkPaymentMethodsCanPay();
checkPaymentMethodsCanPay( true );
};

const resetMockPaymentMethods = () => {
Expand Down

0 comments on commit d4c500a

Please sign in to comment.