From d4c500a159bb704b17dc6bae9538ad9142b26c98 Mon Sep 17 00:00:00 2001 From: Thomas Roberts <5656702+opr@users.noreply.github.com> Date: Wed, 21 Sep 2022 02:18:14 -0700 Subject: [PATCH] Fix failing express payment method unit test (#7165) --- assets/js/data/payment-methods/test/selectors.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/js/data/payment-methods/test/selectors.js b/assets/js/data/payment-methods/test/selectors.js index ee5da0e2410..7fa8064438c 100644 --- a/assets/js/data/payment-methods/test/selectors.js +++ b/assets/js/data/payment-methods/test/selectors.js @@ -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 = () => {