Skip to content

Commit

Permalink
chore: fix jest environment error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed Nov 17, 2023
1 parent b369096 commit 44c6ee9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 3d/scripts/jest/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ const path = require("path");
const NodeEnvironment = require("jest-environment-node");
const { TMP_DIR } = require("./constants");

// @see https://stackoverflow.com/questions/75047051/jest-class-extends-value-object-is-not-a-constructor-or-null
global.TextEncoder = require("util").TextEncoder;
global.TextDecoder = require("util").TextDecoder;

/**
* @see https://jestjs.io/docs/puppeteer
*/
Expand Down

0 comments on commit 44c6ee9

Please sign in to comment.