Files
.github
.husky
packages
app
src
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.prettierignore
.prettierrc
babel.config.js
jest.config.integration.js
jest.config.js
package.json
tsconfig.json
webpack.config.js
core
docs
.gitattributes
.gitignore
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
lerna.json
nx.json
package.json
renovate.json
static-cms-icon.png
static-cms-logo.png
yarn.lock
static-cms/packages/app/jest.config.js
2022-12-15 13:44:49 -05:00

19 lines
581 B
JavaScript

const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.base');
module.exports = {
preset: 'ts-jest',
transform: {
'\\.[jt]sx?$': ['ts-jest', { tsConfig: 'tsconfig.dev.json' }],
'^.+\\.svg$': './test/fileTransformer',
},
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.ts',
},
setupFiles: ['./test/setupEnv.js'],
testRegex: '\\.spec\\.tsx?$',
snapshotSerializers: ['@emotion/jest/serializer'],
};