0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/core/jest.config.js
IceHe.xyz 5625b8838c
refactor(core): split mock.ts into __mocks__/*.ts (#510)
* chore(core,ui): coverage ignore src/__mocks__/

* chore(core): build excludes src/__mocks__/

* refactor(core): split mock.ts into __mocks__/*.ts
2022-04-08 09:47:09 +00:00

17 lines
546 B
JavaScript

/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: ['./jest.setup.js', 'jest-matcher-specific-error'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^jose/(.*)$': '<rootDir>/node_modules/jose/dist/node/cjs/$1',
},
coveragePathIgnorePatterns: ['/node_modules/', '/build/', '/src/__mocks__/'],
coverageReporters: ['text-summary', 'lcov'],
};