/** @type {import('jest').Config} */ module.exports = { testMatch: [ '/packages/*/src/**/*.test.ts', '/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', // ES modules that jest can't handle at the moment. uuid: '/node_modules/uuid/dist/index.js', nanoid: '/node_modules/nanoid/index.cjs', 'nanoid/non-secure': '/node_modules/nanoid/non-secure/index.cjs', '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'], }