Skip to content

Commit

Permalink
Update jest and jest-angular
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Feb 21, 2023
1 parent ee3fa65 commit e527081
Show file tree
Hide file tree
Showing 5 changed files with 1,120 additions and 1,062 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@openapitools/openapi-generator-cli": "1.0.10-4.2.3",
"@types/echarts": "^4.6.0",
"@types/google.analytics": "0.0.40",
"@types/jest": "24.0.23",
"@types/jest": "27.5.2",
"@types/node": "12.12.17",
"@typescript-eslint/eslint-plugin": "4.6",
"@typescript-eslint/eslint-plugin-tslint": "4.6",
Expand All @@ -70,10 +70,10 @@
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"husky": "3.1.0",
"jest": "24.9.0",
"jest": "27.5.1",
"jest-date-mock": "1.0.7",
"jest-junit": "10.0.0",
"jest-preset-angular": "8.0.0",
"jest-preset-angular": "9.0.7",
"jest-sonar-reporter": "2.0.0",
"lint-staged": "8.2.1",
"mini-css-extract-plugin": "0.8.0",
Expand Down
4 changes: 2 additions & 2 deletions src/test/javascript/jest.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const tsconfig = require('../../../tsconfig.json');

module.exports = {
testRunner: 'jest-jasmine2',
preset: 'jest-preset-angular',
setupFiles: ['jest-date-mock'],
setupFilesAfterEnv: ['<rootDir>/src/test/javascript/jest.ts'],
Expand All @@ -9,8 +10,7 @@ module.exports = {
globals: {
'ts-jest': {
stringifyContentPathRegex: '\\.html$',
tsConfig: '<rootDir>/tsconfig.json',
astTransformers: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer']
tsconfig: '<rootDir>/tsconfig.json'
}
},
coveragePathIgnorePatterns: ['<rootDir>/src/test/javascript'],
Expand Down
2 changes: 1 addition & 1 deletion src/test/javascript/jest.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
import './jest-global-mocks';
8 changes: 8 additions & 0 deletions tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"include": ["src/main/webapp/**/*.ts"],
"compilerOptions": {
"outDir": "target/out-tsc/spec",
"types": ["jest", "node"]
}
}
Loading

0 comments on commit e527081

Please sign in to comment.