diff --git a/shell-ui/src/setupTests.ts b/shell-ui/src/setupTests.ts index 0ee4519cba..4eb0782f93 100644 --- a/shell-ui/src/setupTests.ts +++ b/shell-ui/src/setupTests.ts @@ -2,6 +2,7 @@ import fetch from 'node-fetch'; import 'regenerator-runtime/runtime'; import '@testing-library/jest-dom/extend-expect'; import 'jest-localstorage-mock'; +import { TextEncoder, TextDecoder } from 'util'; const nodeCrypto = require('crypto'); @@ -89,3 +90,6 @@ jest.mock('@scality/module-federation', () => { FederatedComponent: () => '', }; }); + +global.TextEncoder = TextEncoder; +global.TextDecoder = TextDecoder;