Skip to content

Commit

Permalink
Update jest to work with new compile
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Jul 17, 2024
1 parent 55adf81 commit a0a70ba
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
const generateJestConfig = ({ esModules }) => {
const esModulesList = Array.isArray(esModules) ? esModules.join('|') : esModules
return {
coveragePathIgnorePatterns: ['<rootDir>/src/Server'],
coverageThreshold: {
global: {
branches: 50,
functions: 70,
lines: 70,
statements: 70,
},
},
coveragePathIgnorePatterns: ['<rootDir>/(.*)/dist'],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
preset: 'ts-jest/presets/default-esm',
preset: 'ts-jest',
setupFiles: ['dotenv/config'],
setupFilesAfterEnv: [],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
testTimeout: 15000,
testRegex: String.raw`(/__tests__/.*|(\.|/)(test|spec))\.tsx?$`,
testTimeout: 15_000,
transform: {
[`(${esModulesList}).+\\.js$`]: [
'babel-jest',
Expand Down

0 comments on commit a0a70ba

Please sign in to comment.