Update backend/jest.config.js

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
This commit is contained in:
Moriz Wahl 2021-12-29 23:16:47 +01:00 committed by GitHub
parent e39d51d335
commit 69d983b891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ module.exports = {
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**'],
moduleNameMapper: {
'@entity/(.*)': '<rootDir>/../database/build/entity/$1',
// This is hack to fix a problem with the library `ts-mysql-migrate` which does differentiate between its ts/js state
'@dbTools/(.*)': process.env.NODE_ENV === 'development' ? '<rootDir>/../database/src/$1' : '<rootDir>/../database/build/src/$1',
},
}