diff --git a/src/setupTests.ts b/src/setupTests.ts index cb1aa44e..1dee4cdf 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -5,6 +5,7 @@ import '@testing-library/jest-dom'; import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; +import { TextDecoder, TextEncoder } from 'util'; // Mock the translations i18n.use(initReactI18next).init({ @@ -31,4 +32,7 @@ jest.mock('./config', () => { VITE_API_SERVER: 'https://example.com', VITE_API_KEY: '122333444455555666666' }; -}) \ No newline at end of file +}) + +global.TextEncoder = TextEncoder as any; +global.TextDecoder = TextDecoder as any; \ No newline at end of file