Skip to content

Commit c8f98e3

Browse files
chore: revert migrate create-react-app to vite (#1144) (#1147)
1 parent ae1d4f0 commit c8f98e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1099
-2673
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ test-results.json
3333
.vscode
3434
codecov
3535
.qodo
36-
*.log

jest.custom.env.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// File introduced to fix the problem "Textdecoder is not defined" while running the tests
2+
// Ref: https://github.com/jsdom/jsdom/issues/2524
3+
4+
/* eslint-disable @typescript-eslint/no-var-requires */
5+
const Environment = require("jest-environment-jsdom");
6+
7+
module.exports = class CustomTestEnvironment extends Environment {
8+
async setup() {
9+
await super.setup();
10+
if (typeof this.global.TextEncoder === "undefined") {
11+
const { TextEncoder, TextDecoder } = require("util");
12+
this.global.TextEncoder = TextEncoder;
13+
this.global.TextDecoder = TextDecoder;
14+
}
15+
}
16+
};

0 commit comments

Comments
 (0)