theatre/jest.config.js

23 lines
730 B
JavaScript
Raw Normal View History

2021-06-18 13:05:06 +02:00
module.exports = {
testMatch: [
'<rootDir>/packages/*/src/**/*.test.ts',
'<rootDir>/theatre/*/src/**/*.test.ts',
],
moduleNameMapper: {
2021-06-18 14:32:01 +02:00
...require('./devEnv/getAliasesFromTsConfig').getAliasesFromTsConfigForJest(),
2021-08-08 10:16:33 +02:00
'\\.(css|svg|png)$': 'identity-obj-proxy',
2021-06-18 13:05:06 +02:00
'lodash-es/(.*)': 'lodash/$1',
'react-use/esm/(.*)': 'react-use/lib/$1',
'lodash-es': 'lodash',
2021-07-14 19:08:25 +02:00
// An ES module that jest can't handle at the moment.
'react-icons/(.*)': 'identity-obj-proxy',
2021-06-18 13:05:06 +02:00
},
setupFiles: ['./theatre/shared/src/setupTestEnv.ts'],
automock: false,
transform: {
'^.+\\.tsx?$': 'esbuild-jest',
'^.+\\.js$': 'esbuild-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
}