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

Commit

Permalink
Dispatch __internalInitializePaymentStore in selector tests
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Oct 19, 2022
1 parent aab49c3 commit 8e0afed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/data/payment/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
CheckoutExpressPayment,
SavedPaymentMethodOptions,
} from '../../../blocks/cart-checkout-shared/payment-methods';
import { checkPaymentMethodsCanPay } from '../check-payment-methods';
import { defaultCartState } from '../../cart/default-state';

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

const resetMockPaymentMethods = () => {
Expand Down

0 comments on commit 8e0afed

Please sign in to comment.