Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Jan 29, 2025
1 parent 5931537 commit 9b2b343
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */

module.exports = {
setupFiles: ["<rootDir>/setup.jest.ts"],
preset: "ts-jest",
testEnvironment: "node",
moduleDirectories: ["node_modules", "<rootDir>"],
Expand Down
4 changes: 4 additions & 0 deletions setup.jest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { TextEncoder, TextDecoder } from "util";
global.TextEncoder = TextEncoder;
// @ts-expect-error - The types are incompatible but the implementation works correctly
global.TextDecoder = TextDecoder;

0 comments on commit 9b2b343

Please sign in to comment.