From e59f1677c87a136b11d7ee97eb59c53db54e4852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Ferr=C3=A3o?= Date: Thu, 7 Nov 2024 15:00:18 -0300 Subject: [PATCH] feat: add useSSR mock to fix some tests --- react/__mocks__/vtex.pixel-manager.js | 2 ++ react/__mocks__/vtex.render-runtime/react/components/NoSSR.js | 1 + 2 files changed, 3 insertions(+) create mode 100644 react/__mocks__/vtex.render-runtime/react/components/NoSSR.js diff --git a/react/__mocks__/vtex.pixel-manager.js b/react/__mocks__/vtex.pixel-manager.js index 1355be386..ff3042bb3 100644 --- a/react/__mocks__/vtex.pixel-manager.js +++ b/react/__mocks__/vtex.pixel-manager.js @@ -5,3 +5,5 @@ const PixelContext = createContext({ push: () => undefined }) export const usePixel = () => { return useContext(PixelContext) } + +export const usePixelEventCallback = () => {} diff --git a/react/__mocks__/vtex.render-runtime/react/components/NoSSR.js b/react/__mocks__/vtex.render-runtime/react/components/NoSSR.js new file mode 100644 index 000000000..9d1c4e77d --- /dev/null +++ b/react/__mocks__/vtex.render-runtime/react/components/NoSSR.js @@ -0,0 +1 @@ +export const useSSR = () => jest.fn()