Skip to content

Commit ae33a5f

Browse files
JeanMecheatscott
authored andcommitted
test(core): fix view injector integration spec
Restore ChangeDetectionStrategy.OnPush that was removed in a previous commit, causing tests to fail due to ExpressionChangedAfterItHasBeenCheckedError.
1 parent e205075 commit ae33a5f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/core/test/linker/view_injector_integration_spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import {expect} from '@angular/private/testing/matchers';
1010
import {
1111
Attribute,
12+
ChangeDetectionStrategy,
1213
ChangeDetectorRef,
1314
Component,
1415
createComponent as coreCreateComponent,
@@ -247,6 +248,8 @@ class DirectiveNeedsChangeDetectorRef {
247248
@Component({
248249
selector: '[componentNeedsChangeDetectorRef]',
249250
template: '{{counter}}',
251+
// Until #69898 lands we need to explicit OnPush
252+
changeDetection: ChangeDetectionStrategy.OnPush,
250253
standalone: false,
251254
})
252255
class PushComponentNeedsChangeDetectorRef {

0 commit comments

Comments
 (0)