mirror of
https://github.com/vale981/apollo-server
synced 2025-03-05 09:41:40 -05:00
27 lines
791 B
JavaScript
27 lines
791 B
JavaScript
const { defaults } = require("jest-config");
|
|
|
|
const { pathsToModuleNameMapper } = require("ts-jest/utils");
|
|
const { compilerOptions } = require("./tsconfig.test.base");
|
|
|
|
module.exports = {
|
|
testEnvironment: "node",
|
|
setupFiles: [
|
|
"<rootDir>/../apollo-server-env/dist/index.js"
|
|
],
|
|
preset: "ts-jest",
|
|
testMatch: null,
|
|
testRegex: "/__tests__/.*\\.test\\.(js|ts)$",
|
|
testPathIgnorePatterns: [
|
|
"/node_modules/",
|
|
"/dist/"
|
|
],
|
|
moduleFileExtensions: [...defaults.moduleFileExtensions, "ts", "tsx"],
|
|
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/../../' }),
|
|
clearMocks: true,
|
|
globals: {
|
|
"ts-jest": {
|
|
tsConfig: "<rootDir>/tsconfig.test.json",
|
|
diagnostics: false
|
|
}
|
|
}
|
|
};
|