2022-12-12 00:43:23 -05:00
/** @type {import('jest').Config} */
const config = {
2023-01-01 05:36:46 -05:00
transform : { } ,
2023-06-29 00:59:23 -05:00
collectCoverageFrom : [ '**/*.{js,ts}' ] ,
2022-12-12 00:43:23 -05:00
coveragePathIgnorePatterns : [ '/node_modules/' , '/src/__mocks__/' ] ,
coverageReporters : [ 'text-summary' , 'lcov' ] ,
2023-01-01 05:36:46 -05:00
coverageProvider : 'v8' ,
2022-12-12 00:43:23 -05:00
testPathIgnorePatterns : [ '/node_modules/' , '/build/routes/session/' ] , // `routes/session` is freezed
setupFilesAfterEnv : [ 'jest-matcher-specific-error' , './jest.setup.js' ] ,
roots : [ './build' ] ,
moduleNameMapper : {
'^#src/(.*)\\.js(x)?$' : '<rootDir>/build/$1' ,
'^(chalk|inquirer)$' : '<rootDir>/../shared/lib/esm/module-proxy.js' ,
2024-04-24 00:51:41 -05:00
// Map the connector-kit to the installed version rather than finding it from the `shared` package (which is the default behavior of `mockEsm` in the `shared` package)
'^@logto/connector-kit$' : '<rootDir>/node_modules/@logto/connector-kit/lib/index.js' ,
2022-12-12 00:43:23 -05:00
} ,
} ;
export default config ;