Skip to content

Commit

Permalink
test: add coverage config
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Mar 10, 2023
1 parent bf4356e commit 5333d19
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion e2e/nx-heroku-e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export default {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/e2e/nx-heroku-e2e',
collectCoverageFrom: ['./src/**/*.(t|j)s'],
coverageReporters: ['html', ['lcovonly'], 'text'],
};
4 changes: 3 additions & 1 deletion e2e/nx-heroku-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"targets": {
"e2e": {
"executor": "@nrwl/nx-plugin:e2e",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"target": "nx-heroku:build",
"jestConfig": "e2e/nx-heroku-e2e/jest.config.ts"
"jestConfig": "e2e/nx-heroku-e2e/jest.config.ts",
"coverageDirectory": "coverage/e2e/nx-heroku-e2e"
},
"configurations": {
"ci": {
Expand Down
3 changes: 2 additions & 1 deletion packages/nx-heroku/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export default {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/packages/nx-heroku',
collectCoverageFrom: ['./src/**/*.(t|j)s'],
coverageReporters: ['html', ['lcovonly'], 'text'],
};
1 change: 1 addition & 0 deletions packages/nx-heroku/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "packages/nx-heroku/jest.config.ts",
"coverageDirectory": "coverage/packages/nx-heroku",
"passWithNoTests": true
},
"configurations": {
Expand Down

0 comments on commit 5333d19

Please sign in to comment.