tmagic-editor/packages/utils/jest.config.js
2022-04-14 15:48:53 +08:00

21 lines
529 B
JavaScript

module.exports = {
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testMatch: ['**/tests/unit/**/*.spec.[jt]s?(x)', '**/__tests__/*.[jt]s?(x)'],
// https://github.com/facebook/jest/issues/6766
testURL: 'http://localhost/',
transformIgnorePatterns: ['/node_modules/'],
collectCoverage: true,
moduleNameMapper: {
'^@tmagic/(.*)$': '<rootDir>/../$1/src/index.ts',
},
moduleFileExtensions: ['js', 'json', 'ts'],
globals: {
'ts-jest': {
babelConfig: false,
},
},
};