From c436c0e6d213c13435195b193c0f68cfdaf395c4 Mon Sep 17 00:00:00 2001 From: Alexander Zubko Date: Thu, 11 Jan 2024 15:08:48 -0300 Subject: [PATCH] test: fix mock for useStripe (#1559) `useStripe` returns functions rather than other hooks. In reality it doesn't return all functions from the `mockFunctions` object, but using a superset for the mock should still be fine as TS won't allow calling the functions which are not in the declared type of the hook. --- jest/mock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest/mock.js b/jest/mock.js index 7858e10c2..f35ceab9c 100644 --- a/jest/mock.js +++ b/jest/mock.js @@ -186,5 +186,5 @@ module.exports = { GooglePayButton: () => 'GooglePayButton', AddToWalletButton: () => 'AddToWalletButton', PlatformPayButton: () => 'PlatformPayButton', - useStripe: jest.fn(() => mockHooks), + useStripe: jest.fn(() => mockFunctions), };