From f6cd545ca711ca1337df0ec99fec1654d9752285 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Sun, 3 Apr 2022 13:02:15 -0700 Subject: [PATCH] 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: * /package.json * /dist/package.json --- server/jest.config.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/server/jest.config.js b/server/jest.config.js index f3f38ac9..58af244d 100644 --- a/server/jest.config.js +++ b/server/jest.config.js @@ -1,10 +1,11 @@ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', - setupFiles: ["/test/setup-tests.ts"], - moduleNameMapper: { - "@lib/(.*)": "/src/lib/$1", - "@routes/(.*)": "/src/routes/$1" - }, -}; + preset: "ts-jest", + testEnvironment: "node", + setupFiles: ["/test/setup-tests.ts"], + moduleNameMapper: { + "@lib/(.*)": "/src/lib/$1", + "@routes/(.*)": "/src/routes/$1" + }, + testPathIgnorePatterns: ["/node_modules/", "/dist/"] +}