Fix failing express payment method unit test (https://github.com/woocommerce/woocommerce-blocks/pull/7165)
This commit is contained in:
parent
37d6802252
commit
512aa911f3
|
@ -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 ) => {
|
||||
|
@ -131,6 +132,8 @@ const registerMockPaymentMethods = ( savedCards = true ) => {
|
|||
},
|
||||
} );
|
||||
} );
|
||||
checkPaymentMethodsCanPay();
|
||||
checkPaymentMethodsCanPay( true );
|
||||
};
|
||||
|
||||
const resetMockPaymentMethods = () => {
|
||||
|
|
Loading…
Reference in New Issue