Skip to content

Commit

Permalink
fix: jest coverage reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoVazquez committed Nov 28, 2024
1 parent 06a00ac commit c6c9289
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 28 deletions.
1 change: 1 addition & 0 deletions packages/examples/lumberjack-app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {},
coverageReporters: ['lcovonly', 'text-summary'],
coverageDirectory: '../../../coverage/packages/examples/lumberjack-app',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
Expand Down
7 changes: 1 addition & 6 deletions packages/examples/lumberjack-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@
"ci": {
"ci": true,
"coverage": true
},
"coverage": {
"ci": true,
"coverageReporters": ["lcovonly", "text-summary"],
"coverage": true
}
},
"defaultConfiguration": "coverage"
"defaultConfiguration": "ci"
},
"serve-static": {
"executor": "@nx/web:file-server",
Expand Down
4 changes: 3 additions & 1 deletion packages/examples/lumberjack-app/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import 'jest-preset-angular/setup-jest';
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';

setupZoneTestEnv();
1 change: 1 addition & 0 deletions packages/internal/console-driver/test-util/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {},
coverageReporters: ['lcovonly', 'text-summary'],
coverageDirectory: '../../../../coverage/packages/internal/console-driver/test-util',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
Expand Down
7 changes: 1 addition & 6 deletions packages/internal/console-driver/test-util/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
"ci": {
"ci": true,
"coverage": true
},
"coverage": {
"ci": true,
"coverageReporters": ["lcovonly", "text-summary"],
"coverage": true
}
},
"defaultConfiguration": "coverage"
"defaultConfiguration": "ci"
},
"lint": {
"outputs": ["{workspaceRoot}/reports/packages/internal/console-driver/test-util/lint/report.json"],
Expand Down
4 changes: 3 additions & 1 deletion packages/internal/console-driver/test-util/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import 'jest-preset-angular/setup-jest';
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';

setupZoneTestEnv();
1 change: 1 addition & 0 deletions packages/internal/test-util/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {},
coverageReporters: ['lcovonly', 'text-summary'],
coverageDirectory: '../../../coverage/packages/internal/test-util',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
Expand Down
7 changes: 1 addition & 6 deletions packages/internal/test-util/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
"ci": {
"ci": true,
"coverage": true
},
"coverage": {
"ci": true,
"coverageReporters": ["lcovonly", "text-summary"],
"coverage": true
}
},
"defaultConfiguration": "coverage"
"defaultConfiguration": "ci"
},
"lint": {
"outputs": ["{workspaceRoot}/reports/packages/internal/test-util/lint/report.json"],
Expand Down
4 changes: 3 additions & 1 deletion packages/internal/test-util/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import 'jest-preset-angular/setup-jest';
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';

setupZoneTestEnv();
1 change: 1 addition & 0 deletions packages/ngworker/lumberjack/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {},
coverageReporters: ['lcovonly', 'text-summary'],
coverageDirectory: '../../../coverage/packages/ngworker/lumberjack',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
Expand Down
7 changes: 1 addition & 6 deletions packages/ngworker/lumberjack/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,9 @@
"ci": {
"ci": true,
"coverage": true
},
"coverage": {
"ci": true,
"coverageReporters": ["lcovonly", "text-summary"],
"coverage": true
}
},
"defaultConfiguration": "coverage"
"defaultConfiguration": "ci"
},
"lint": {
"outputs": ["{workspaceRoot}/reports/packages/ngworker/lumberjack/lint/report.json"],
Expand Down
4 changes: 3 additions & 1 deletion packages/ngworker/lumberjack/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import 'jest-preset-angular/setup-jest';
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';

setupZoneTestEnv();

0 comments on commit c6c9289

Please sign in to comment.