From 8d1b93414156308b259851d7d39d6f9daabd6e02 Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Thu, 9 Jan 2025 16:01:08 +0000 Subject: [PATCH] fix: fix text by mocking quick-lru --- jest.setup.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jest.setup.ts b/jest.setup.ts index 48531128fe..e4877f42b6 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -1,6 +1,7 @@ import { config } from 'dotenv' import 'jest-styled-components' // include style rules in snapshots import fetchMock from 'jest-fetch-mock' // Mocks `fetch` calls in unittests +import QuickLRU from 'quick-lru' import { Readable } from 'stream' import { TextDecoder, TextEncoder } from 'util' @@ -19,3 +20,10 @@ fetchMock.dontMock() jest.mock('react-markdown', () => () => null) jest.mock('lottie-react', () => () => null) + +jest.mock('quick-lru', () => { + return { + __esModule: true, + default: QuickLRU, + } +})