theatre/jest.config.js
Cole Lawrence 11b5d175f4
Fix github checks (#263)
* Update dependencies which pass tests locally

* Break the yarn cache in an attempt to fix checks

* playground: Add wrapping error info for build.ts

* playground: Don't use dev mode in CI tests

* playground: Use tsc for typecheck

* playground: Specify working esbuild version 0.13.15

* playground: Use only promises in build.ts

* playground: Ensure serving in ci e2e

 * Add echo for vercel for build:static
2022-07-25 10:37:34 +02:00

33 lines
881 B
JavaScript

/** @type {import('jest').Config} */
module.exports = {
testMatch: [
'<rootDir>/packages/*/src/**/*.test.ts',
'<rootDir>/theatre/*/src/**/*.test.ts',
],
moduleNameMapper: {
...require('./devEnv/getAliasesFromTsConfig').getAliasesFromTsConfigForJest(),
'\\.(css|svg|png)$': 'identity-obj-proxy',
'lodash-es/(.*)': 'lodash/$1',
'react-use/esm/(.*)': 'react-use/lib/$1',
'lodash-es': 'lodash',
// An ES module that jest can't handle at the moment.
'react-icons/(.*)': 'identity-obj-proxy',
},
setupFiles: ['./theatre/shared/src/setupTestEnv.ts'],
automock: false,
transform: {
'^.+\\.tsx?$': [
'esbuild-jest',
{
sourcemap: true,
},
],
'^.+\\.js$': [
'esbuild-jest',
{
sourcemap: true,
},
],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
}