diff --git a/packages/examples/lumberjack-app/jest.config.ts b/packages/examples/lumberjack-app/jest.config.ts index 463ded31..d70c2cb4 100644 --- a/packages/examples/lumberjack-app/jest.config.ts +++ b/packages/examples/lumberjack-app/jest.config.ts @@ -4,6 +4,7 @@ export default { preset: '../../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], globals: {}, + coverageReporters: ['lcovonly', 'text-summary'], coverageDirectory: '../../../coverage/packages/examples/lumberjack-app', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/packages/examples/lumberjack-app/project.json b/packages/examples/lumberjack-app/project.json index 05b9e7ef..16c8ee64 100644 --- a/packages/examples/lumberjack-app/project.json +++ b/packages/examples/lumberjack-app/project.json @@ -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", diff --git a/packages/examples/lumberjack-app/src/test-setup.ts b/packages/examples/lumberjack-app/src/test-setup.ts index 1100b3e8..58c511e0 100644 --- a/packages/examples/lumberjack-app/src/test-setup.ts +++ b/packages/examples/lumberjack-app/src/test-setup.ts @@ -1 +1,3 @@ -import 'jest-preset-angular/setup-jest'; +import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone'; + +setupZoneTestEnv(); diff --git a/packages/internal/console-driver/test-util/jest.config.ts b/packages/internal/console-driver/test-util/jest.config.ts index b92b7d19..fb7a2443 100644 --- a/packages/internal/console-driver/test-util/jest.config.ts +++ b/packages/internal/console-driver/test-util/jest.config.ts @@ -4,6 +4,7 @@ export default { preset: '../../../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], globals: {}, + coverageReporters: ['lcovonly', 'text-summary'], coverageDirectory: '../../../../coverage/packages/internal/console-driver/test-util', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/packages/internal/console-driver/test-util/project.json b/packages/internal/console-driver/test-util/project.json index 1d56e8e4..7182b697 100644 --- a/packages/internal/console-driver/test-util/project.json +++ b/packages/internal/console-driver/test-util/project.json @@ -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"], diff --git a/packages/internal/console-driver/test-util/src/test-setup.ts b/packages/internal/console-driver/test-util/src/test-setup.ts index 1100b3e8..58c511e0 100644 --- a/packages/internal/console-driver/test-util/src/test-setup.ts +++ b/packages/internal/console-driver/test-util/src/test-setup.ts @@ -1 +1,3 @@ -import 'jest-preset-angular/setup-jest'; +import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone'; + +setupZoneTestEnv(); diff --git a/packages/internal/test-util/jest.config.ts b/packages/internal/test-util/jest.config.ts index df6c0a13..bbe5fe31 100644 --- a/packages/internal/test-util/jest.config.ts +++ b/packages/internal/test-util/jest.config.ts @@ -4,6 +4,7 @@ export default { preset: '../../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], globals: {}, + coverageReporters: ['lcovonly', 'text-summary'], coverageDirectory: '../../../coverage/packages/internal/test-util', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/packages/internal/test-util/project.json b/packages/internal/test-util/project.json index 17d5d9d1..16440353 100644 --- a/packages/internal/test-util/project.json +++ b/packages/internal/test-util/project.json @@ -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"], diff --git a/packages/internal/test-util/src/test-setup.ts b/packages/internal/test-util/src/test-setup.ts index 1100b3e8..58c511e0 100644 --- a/packages/internal/test-util/src/test-setup.ts +++ b/packages/internal/test-util/src/test-setup.ts @@ -1 +1,3 @@ -import 'jest-preset-angular/setup-jest'; +import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone'; + +setupZoneTestEnv(); diff --git a/packages/ngworker/lumberjack/jest.config.ts b/packages/ngworker/lumberjack/jest.config.ts index 2a6368f2..20b71191 100644 --- a/packages/ngworker/lumberjack/jest.config.ts +++ b/packages/ngworker/lumberjack/jest.config.ts @@ -4,6 +4,7 @@ export default { preset: '../../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], globals: {}, + coverageReporters: ['lcovonly', 'text-summary'], coverageDirectory: '../../../coverage/packages/ngworker/lumberjack', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/packages/ngworker/lumberjack/project.json b/packages/ngworker/lumberjack/project.json index 799457b8..a2e6f43f 100644 --- a/packages/ngworker/lumberjack/project.json +++ b/packages/ngworker/lumberjack/project.json @@ -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"], diff --git a/packages/ngworker/lumberjack/src/test-setup.ts b/packages/ngworker/lumberjack/src/test-setup.ts index 1100b3e8..58c511e0 100644 --- a/packages/ngworker/lumberjack/src/test-setup.ts +++ b/packages/ngworker/lumberjack/src/test-setup.ts @@ -1 +1,3 @@ -import 'jest-preset-angular/setup-jest'; +import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone'; + +setupZoneTestEnv();