AppFlowy/frontend/appflowy_tauri/jest.config.cjs
Kilu.He 0783f94cd6
chore: optimize the experience of the document (#4152)
* fix: scroll bug of grid

* chore: optimize the experience of the document

* fix: drag folder

* fix: add unit test to provider
2023-12-18 17:44:47 +08:00

21 lines
718 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})`],
"testRegex": "(/__tests__/.*\.(test|spec))\\.(jsx?|tsx?)$",
};