mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:26:45 +00:00
e27cff15c9
* feat: support to parse association variable * chore: change comment * feat(operators): support array as value in string operator * refactor: add a special marker * feat: date support to-multi field variables * feat: support for notIn * refactor: rename * test: fix test error * Revert "test: fix test error" This reverts commit 3d139698f6295678a39b77b08c88427f9fafe247. * Revert "refactor: rename" This reverts commit 2e16225c038e18ee25f1136d510cb4746bd9932f. * Revert "feat: support for notIn" This reverts commit 2087e5c4da1429b260890d5136c714ad541955a9. * Revert "feat: date support to-multi field variables" This reverts commit 0d7b2db0512ba7b632a2ab61f37cf83c0d06b9a1. * Revert "refactor: add a special marker" This reverts commit 7ba2e4bc00d79f60a2e90340df65b2938985750a. * Revert "feat(operators): support array as value in string operator" This reverts commit 0897cd19e9863248ef9e2af6c91ee14e805778a4. * refactor: improve code * test: fix can not import style file * feat: only eq and ne oprators support mutil relation fields * test: add example.test.ts * refactor: remove jsonata * Revert "test: add example.test.ts" This reverts commit 0ad2ea458cd8a964891490d2021a5b000f391395. * test: fix error * fix: fix error * refactor: remove async * chore: rebase * test: fix error * test: fix errors
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
const { pathsToModuleNameMapper } = require('ts-jest/utils');
|
|
const { compilerOptions } = require('./tsconfig.json');
|
|
const { defaults } = require('jest-config');
|
|
|
|
module.exports = {
|
|
rootDir: process.cwd(),
|
|
collectCoverage: false,
|
|
verbose: true,
|
|
testEnvironment: 'jsdom',
|
|
preset: 'ts-jest',
|
|
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
|
|
setupFiles: ['./jest.setup.ts'],
|
|
setupFilesAfterEnv: [require.resolve('jest-dom/extend-expect'), './jest.setupAfterEnv.ts'],
|
|
moduleNameMapper: {
|
|
...pathsToModuleNameMapper(compilerOptions.paths, {
|
|
prefix: '<rootDir>/',
|
|
}),
|
|
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
|
|
},
|
|
globals: {
|
|
'ts-jest': {
|
|
babelConfig: false,
|
|
tsconfig: './tsconfig.jest.json',
|
|
diagnostics: false,
|
|
},
|
|
},
|
|
modulePathIgnorePatterns: ['/esm/', '/es/', '/dist/', '/lib/'],
|
|
// add .mjs .cjs for formula.js
|
|
moduleFileExtensions: [...defaults.moduleFileExtensions, 'mjs', 'cjs'],
|
|
coveragePathIgnorePatterns: [
|
|
'/node_modules/',
|
|
'/__tests__/',
|
|
'/esm/',
|
|
'/lib/',
|
|
'package.json',
|
|
'/demo/',
|
|
'package-lock.json',
|
|
],
|
|
};
|