Skip to content

Commit

Permalink
Add TextEncoder and TextDecoder polyfills to setupTests
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Dec 5, 2024
1 parent 5cd0c10 commit 1578894
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shell-ui/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -89,3 +90,6 @@ jest.mock('@scality/module-federation', () => {
FederatedComponent: () => '',
};
});

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;

0 comments on commit 1578894

Please sign in to comment.