mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 12:56:13 +00:00
9e5e96b9e4
* fix: client lib require wrapper * fix: bug * fix: add tsconfig.paths.json * fix: collection dir not exists * fix: improve... * fix: update yarn.lock * fix: db.sync * fix: bugs * fix: bugs * fix: bugs * fix: bugs && allow user custom build config * docs: user custom config docs * refactor: custom user build config * fix: bugs * fix: build plugin-client bug --------- Co-authored-by: chenos <chenlinxh@gmail.com>
40 lines
998 B
JavaScript
40 lines
998 B
JavaScript
const { pathsToModuleNameMapper } = require('ts-jest');
|
|
const { compilerOptions } = require('./tsconfig.paths.json');
|
|
const { defaults } = require('jest-config');
|
|
|
|
module.exports = {
|
|
rootDir: process.cwd(),
|
|
collectCoverage: false,
|
|
verbose: true,
|
|
preset: 'ts-jest',
|
|
testMatch: ['**/__tests__/**/*.test.[jt]s'],
|
|
setupFiles: ['./jest.setup.ts'],
|
|
setupFilesAfterEnv: ['./jest.setupAfterEnv.ts'],
|
|
moduleNameMapper: {
|
|
...pathsToModuleNameMapper(compilerOptions.paths, {
|
|
prefix: '<rootDir>/',
|
|
}),
|
|
},
|
|
transform: {
|
|
'^.+\\.{ts|tsx}?$': [
|
|
'ts-jest',
|
|
{
|
|
babelConfig: false,
|
|
tsconfig: './tsconfig.jest.json',
|
|
diagnostics: false,
|
|
},
|
|
],
|
|
},
|
|
modulePathIgnorePatterns: ['/esm/', '/es/', '/dist/', '/lib/', '/client/', '/sdk/', '\\.test\\.tsx$'],
|
|
coveragePathIgnorePatterns: [
|
|
'/node_modules/',
|
|
'/__tests__/',
|
|
'/esm/',
|
|
'/lib/',
|
|
'package.json',
|
|
'/demo/',
|
|
'package-lock.json',
|
|
'/storage/',
|
|
],
|
|
};
|