From ca5dbd7045df9f69da1d10746d294033d430350f Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Tue, 29 Oct 2024 18:57:35 +0400 Subject: [PATCH] Mock @folio/stripes-react-hotkeys to fix tests --- test/jest/__mock__/index.js | 1 + test/jest/__mock__/stripesReactHotkeys.mock.js | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 test/jest/__mock__/stripesReactHotkeys.mock.js diff --git a/test/jest/__mock__/index.js b/test/jest/__mock__/index.js index 7b8e2c73..33127089 100644 --- a/test/jest/__mock__/index.js +++ b/test/jest/__mock__/index.js @@ -9,4 +9,5 @@ import './resizeObserver.mock'; import './stripesConfig.mock'; import './stripesCore.mock'; import './stripesIcon.mock'; +import './stripesReactHotkeys.mock'; import './stripesSmartComponents.mock'; diff --git a/test/jest/__mock__/stripesReactHotkeys.mock.js b/test/jest/__mock__/stripesReactHotkeys.mock.js new file mode 100644 index 00000000..a8e53ea3 --- /dev/null +++ b/test/jest/__mock__/stripesReactHotkeys.mock.js @@ -0,0 +1,4 @@ +jest.mock('@folio/stripes-react-hotkeys', () => ({ + ...jest.requireActual('@folio/stripes-react-hotkeys'), + HotKeys: ({ children }) =>
{children}
, +}));