server: modify jest config to ignore node_modules, dist directories

without this, invoking `jest` would cause this warning:
jest-haste-map: Haste module naming collision: sequelize-typescript-starter
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/package.json
    * <rootDir>/dist/package.json
This commit is contained in:
Max Leiter 2022-04-03 13:02:15 -07:00
parent 76a2b50c6b
commit f6cd545ca7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: A3512F2F2F17EBDA

View file

@ -1,10 +1,11 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFiles: ["<rootDir>/test/setup-tests.ts"],
moduleNameMapper: {
"@lib/(.*)": "<rootDir>/src/lib/$1",
"@routes/(.*)": "<rootDir>/src/routes/$1"
},
};
preset: "ts-jest",
testEnvironment: "node",
setupFiles: ["<rootDir>/test/setup-tests.ts"],
moduleNameMapper: {
"@lib/(.*)": "<rootDir>/src/lib/$1",
"@routes/(.*)": "<rootDir>/src/routes/$1"
},
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/dist/"]
}