static-cms/packages/core/jest.config.js

19 lines
568 B
JavaScript
Raw Permalink Normal View History

2022-12-04 22:15:59 -05:00
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.base');
module.exports = {
preset: 'ts-jest',
transform: {
'\\.[jt]sx?$': ['ts-jest', { tsconfig: 'tsconfig.dev.json' }],
2022-12-04 22:15:59 -05:00
'^.+\\.svg$': './test/fileTransformer',
},
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.ts',
},
setupFiles: ['./test/setupEnv.js'],
2023-03-30 13:29:09 -04:00
globalSetup: './test/globalSetup.js',
testRegex: '\\.spec\\.tsx?$',
2022-12-04 22:15:59 -05:00
};