diff --git a/angular.json b/angular.json index 0035220a..2e9f26cd 100644 --- a/angular.json +++ b/angular.json @@ -4,7 +4,7 @@ "cli": { "analytics": false, "cache": { - "enabled": true, + "enabled": false, "path": "./.cache/angular", "environment": "all" } @@ -32,9 +32,17 @@ }, "defaultConfiguration": "production" }, + "test-build-zoneless": { + "builder": "@angular/build:application", + "options": { + "polyfills": [], + "tsConfig": "projects/testing-library/tsconfig.spec.json" + } + }, "test": { "builder": "@angular/build:unit-test", "options": { + "buildTarget": "testing-library:test-build-zoneless", "setupFiles": ["projects/testing-library/test-setup.ts"] } }, diff --git a/apps/example-app-karma/src/app/issues/issue-491.spec.ts b/apps/example-app-karma/src/app/issues/issue-491.spec.ts index 89c6e844..9c967710 100644 --- a/apps/example-app-karma/src/app/issues/issue-491.spec.ts +++ b/apps/example-app-karma/src/app/issues/issue-491.spec.ts @@ -1,4 +1,4 @@ -import { Component, inject, ChangeDetectionStrategy } from '@angular/core'; +import { Component, inject } from '@angular/core'; import { Router } from '@angular/router'; import { render, screen } from '@testing-library/angular'; import userEvent from '@testing-library/user-event'; @@ -35,8 +35,6 @@ it('test click event with router.navigate', async () => { }); @Component({ - // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection - changeDetection: ChangeDetectionStrategy.Eager, template: `

Login

@@ -52,8 +50,6 @@ class LoginComponent { } @Component({ - // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection - changeDetection: ChangeDetectionStrategy.Eager, template: `

Logged In

`, }) class LoggedInComponent {}