Initial Project Commit
This commit is contained in:
commit
a6dea9c888
2148 changed files with 173870 additions and 0 deletions
29
jest.conf.js
Normal file
29
jest.conf.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
const { pathsToModuleNameMapper } = require('ts-jest');
|
||||
|
||||
const {
|
||||
compilerOptions: { paths = {}, baseUrl = './' },
|
||||
} = require('./tsconfig.json');
|
||||
const environment = require('./webpack/environment');
|
||||
|
||||
module.exports = {
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|dayjs/esm)'],
|
||||
resolver: 'jest-preset-angular/build/resolvers/ng-jest-resolver.js',
|
||||
globals: {
|
||||
...environment,
|
||||
},
|
||||
roots: ['<rootDir>', `<rootDir>/${baseUrl}`],
|
||||
modulePaths: [`<rootDir>/${baseUrl}`],
|
||||
setupFiles: ['jest-date-mock'],
|
||||
cacheDirectory: '<rootDir>/target/jest-cache',
|
||||
coverageDirectory: '<rootDir>/target/test-results/',
|
||||
moduleNameMapper: pathsToModuleNameMapper(paths, { prefix: `<rootDir>/${baseUrl}/` }),
|
||||
reporters: [
|
||||
'default',
|
||||
['jest-junit', { outputDirectory: '<rootDir>/target/test-results/', outputName: 'TESTS-results-jest.xml' }],
|
||||
['jest-sonar', { outputDirectory: './target/test-results/jest', outputName: 'TESTS-results-sonar.xml' }],
|
||||
],
|
||||
testMatch: ['<rootDir>/src/main/webapp/app/**/@(*.)@(spec.ts)'],
|
||||
testEnvironmentOptions: {
|
||||
url: 'https://jhipster.tech',
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue