forked from react-querybuilder/react-querybuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.common.mjs
More file actions
19 lines (18 loc) · 947 Bytes
/
jest.common.mjs
File metadata and controls
19 lines (18 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// These options are imported into the Jest config of each package, so
// `<rootDir>` refers to the respective /packages/* folder, e.g.
// /packages/antd, /packages/material, etc., not the root of the repo.
/** @type {import('@jest/types').Config.InitialOptions} */
export default {
coveragePathIgnorePatterns: ['/utils/testing/', '/dist/', 'TestUtils.ts'],
setupFilesAfterEnv: ['<rootDir>/../../jestSetup.ts'],
testEnvironment: '<rootDir>/../../utils/fixJSDOMEnvironment.ts',
testEnvironmentOptions: { globalsCleanup: 'on' },
// Keep these in sync with /tsconfig.json#compilerOptions#paths.
moduleNameMapper: {
'^react-querybuilder$': '<rootDir>/../../packages/react-querybuilder/src',
'^@react-querybuilder/core$': '<rootDir>/../../packages/core/src',
'^@rqb-testing$': '<rootDir>/../../utils/testing',
'^@rqb-dbquerytestutils$':
'<rootDir>/../../packages/core/src/utils/formatQuery/dbqueryTestUtils',
},
};