test(core): fix view injector integration spec

Restore ChangeDetectionStrategy.OnPush that was removed in a previous commit, causing tests to fail due to ExpressionChangedAfterItHasBeenCheckedError.
This commit is contained in:
Matthieu Riegler
2026-09-11 01:08:58 +02:00
committed by Andrew Scott
parent e2050759a4
commit ae33a5f55e
@@ -9,6 +9,7 @@
import {expect} from '@angular/private/testing/matchers';
import {
Attribute,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
createComponent as coreCreateComponent,
@@ -247,6 +248,8 @@ class DirectiveNeedsChangeDetectorRef {
@Component({
selector: '[componentNeedsChangeDetectorRef]',
template: '{{counter}}',
// Until #69898 lands we need to explicit OnPush
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
class PushComponentNeedsChangeDetectorRef {