Skip to content

Commit

Permalink
packaging: jest migration
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetkovv authored and Max-Levitskiy committed Apr 27, 2020
1 parent 2a335b0 commit 96e83f3
Show file tree
Hide file tree
Showing 18 changed files with 8,140 additions and 3,939 deletions.
3 changes: 3 additions & 0 deletions __mocks__/js-sha512.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function sha512(s) {
return s;
}
16 changes: 3 additions & 13 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,10 @@
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-builders/jest:run",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
"configPath": "jest.config.js"
}
},
"lint": {
Expand Down Expand Up @@ -141,4 +131,4 @@
}
},
"defaultProject": "auth-web"
}
}
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
globals: {
'ts-jest': {
tsConfig: '<rootDir>/src/tsconfig.spec.json',
},
},
preset: "jest-preset-angular",
setupFilesAfterEnv: ["<rootDir>/src/setupJest.ts"]
};
Loading

0 comments on commit 96e83f3

Please sign in to comment.