mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
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 {
|
||||
|
||||
Reference in New Issue
Block a user