Skip to content

Commit

Permalink
implement fix from kulshekhar/ts-jest#2399
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarea committed Sep 1, 2022
1 parent 12965f3 commit cc7842d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ export default {
// globalTeardown: null,

// A set of global variables that need to be available in all test environments
// globals: {},
globals: {
'ts-jest': {
useESM: true,
},
},

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
Expand All @@ -72,7 +76,9 @@ export default {
moduleFileExtensions: ["js", "ts"],

// A map from regular expressions to module names that allow to stub out resources with a single module
// moduleNameMapper: {},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
Expand Down
File renamed without changes.

0 comments on commit cc7842d

Please sign in to comment.