Skip to content

Commit

Permalink
Fix jsdom import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gusevda committed Jan 11, 2025
1 parent 281befd commit d4888bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
},
],
},
transformIgnorePatterns: ["/node_modules/(?!(yaml)/)"],
transformIgnorePatterns: ["/node_modules/(?!(yaml|@asamuzakjp\/css-color))"],
setupFilesAfterEnv: ["<rootDir>/setup-jest.ts"],
modulePathIgnorePatterns: ["<rootDir>/dist/"],
testEnvironment: "jsdom",
Expand Down
4 changes: 4 additions & 0 deletions setup-jest.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { TextEncoder, TextDecoder } from 'util';
import failOnConsole from 'jest-fail-on-console'

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder as typeof global.TextDecoder;

failOnConsole()

0 comments on commit d4888bd

Please sign in to comment.