forked from apollographql/federation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.base.js
More file actions
27 lines (26 loc) · 847 Bytes
/
Copy pathjest.config.base.js
File metadata and controls
27 lines (26 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { defaults } = require("jest-config");
module.exports = {
testEnvironment: "node",
preset: "ts-jest",
testMatch: null,
testRegex: "/__tests__/.*\\.test\\.(js|ts)$",
testPathIgnorePatterns: [
"/node_modules/",
"/dist/"
],
moduleFileExtensions: [...defaults.moduleFileExtensions, "ts", "tsx"],
moduleNameMapper: {
'^__mocks__/(.*)$': '<rootDir>/src/__mocks__/$1',
// This regex should match the packages that we want compiled from source
// through `ts-jest`, as opposed to loaded from their output files in
// `dist`.
'^((?:federation-js|gateway-js)[^/]*)(?:/dist)?((?:/.*)|$)': '<rootDir>/../$1/src$2'
},
clearMocks: true,
globals: {
"ts-jest": {
tsConfig: "<rootDir>/src/__tests__/tsconfig.json",
diagnostics: false
}
}
};