mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
35 lines
852 B
JavaScript
35 lines
852 B
JavaScript
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
module.exports = {
|
|
preset: "ts-jest/presets/default-esm",
|
|
roots: ["."],
|
|
testEnvironment: "node",
|
|
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
|
|
testEnvironmentOptions: {
|
|
NODE_ENV: "test"
|
|
},
|
|
transform: {
|
|
"^.+\\.tsx?$": [
|
|
"ts-jest",
|
|
{
|
|
useESM: true,
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
|
},
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!(@codeflash-ai)/)'
|
|
],
|
|
extensionsToTreatAsEsm: [".ts", ".tsx"],
|
|
testRegex: ".*\\.test\\.ts$",
|
|
testPathIgnorePatterns: process.env.CI ? ["e2e.test.ts"] : [],
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
|
testTimeout: 10000,
|
|
forceExit: true,
|
|
detectOpenHandles: false,
|
|
clearMocks: true,
|
|
maxWorkers: 1,
|
|
verbose: false,
|
|
silent: false,
|
|
}
|