aboutsummaryrefslogtreecommitdiffstats
path: root/jest.setup.js
diff options
context:
space:
mode:
Diffstat (limited to 'jest.setup.js')
-rw-r--r--jest.setup.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jest.setup.js b/jest.setup.js
index 8124620..92c6c3b 100644
--- a/jest.setup.js
+++ b/jest.setup.js
@@ -5,3 +5,13 @@ import './tests/jest/__mocks__/matchMedia.mock';
jest.mock('next/router', () => nextRouterMock);
jest.mock('next/dynamic', () => () => 'dynamic-import');
+
+/* Jest complains about "Must use import to load ES Module" when importing
+ * unified and rehype modules. Maybe it is not the right way to avoid those
+ * errors but for now it is the only things that work. */
+jest.mock('src/utils/helpers/rehype.ts', () => {
+ return {
+ __esModule: true,
+ updateContentTree: jest.fn((str) => str),
+ };
+});