diff --git a/assets/js/base/context/providers/cart-checkout/cart-events/test/index.tsx b/assets/js/base/context/providers/cart-checkout/cart-events/test/index.tsx index e4b5656a53b..48ab11154a7 100644 --- a/assets/js/base/context/providers/cart-checkout/cart-events/test/index.tsx +++ b/assets/js/base/context/providers/cart-checkout/cart-events/test/index.tsx @@ -13,7 +13,7 @@ import Block from '../../../../../../blocks/cart/inner-blocks/proceed-to-checkou describe( 'CartEventsProvider', () => { it( 'allows observers to unsubscribe', async () => { - const mockObserver = jest.fn(); + const mockObserver = jest.fn().mockReturnValue( { type: 'error' } ); const MockObserverComponent = () => { const { onProceedToCheckout } = useCartEventsContext(); useEffect( () => {