AppFlowy/frontend/appflowy_web_app/jest.config.cjs
Kilu.He 9135fb94ad
feat: support web document and cypress test (#5116)
* feat: support web document and cypress test

* fix: support blocks

* fix: support table and outline

* fix: update nginx
2024-04-29 14:32:14 +08:00

20 lines
676 B
JavaScript

const { compilerOptions } = require('./tsconfig.json');
const { pathsToModuleNameMapper } = require('ts-jest');
const esModules = ['lodash-es', 'nanoid'].join('|');
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>'],
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths),
'^lodash-es(/(.*)|$)': 'lodash$1',
'^nanoid(/(.*)|$)': 'nanoid$1',
},
'transform': {
'(.*)/node_modules/nanoid/.+\\.(j|t)sx?$': 'ts-jest',
},
'transformIgnorePatterns': [`/node_modules/(?!${esModules})`],
};