Skip to content

Commit

Permalink
fix: fix jest config
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Dominguez <[email protected]>
  • Loading branch information
adborroto committed Oct 4, 2024
1 parent 692918f commit 1c898bd
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
const jestJunitConfig = process.env.CI && require('@mixmaxhq/jest-junit-config');

const jestCoverageConfig = {
testEnvironment: 'node',
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
testRegex: '/((test|spec)s?|src)/.*([Tt]est|[Ss]pec)\\.(ts|js)$',
coverageDirectory: 'coverage',
collectCoverageFrom: ['src/**/*.{ts,js}', '!src/**/*.d.ts'],
preset: 'ts-jest',
};

module.exports = {
clearMocks: true,
...jestJunitConfig,
...jestCoverageConfig,
collectCoverageFrom: ['src/**/*.[tj]s', '!src/**/*.fixtures.[tj]s', '!**/src/**/*.test.[tj]s'],
collectCoverageFrom: ['src/**/*.js'],
coverageDirectory: 'coverage',
testRegex: '/((test|spec)s?|src)/.*([Tt]est|[Ss]pec)\\.(ts|js)$',
testEnvironment: 'node',
moduleNameMapper: {
'^mongodbMapped$': `mongodb${process.env.DRIVER_VERSION || ''}`,
},
testTimeout: 15000,
};

0 comments on commit 1c898bd

Please sign in to comment.