| 432 | } |
| 433 | |
| 434 | @Component({ |
| 435 | selector: 'my-app', |
| 436 | template: '<my-comp [name]="name"></my-comp>', |
| 437 | standalone: false, |
| 438 | |
| 439 | changeDetection: ChangeDetectionStrategy.Eager, |
| 440 | }) |
| 441 | class MyApp { |
| 442 | @ViewChild(MyComponent) comp!: MyComponent; |
| 443 | name: string = 'Nancy'; |
| 444 | } |
| 445 | |
| 446 | it('should check OnPush components on initialization', () => { |
| 447 | TestBed.configureTestingModule({declarations: [MyComponent, MyApp]}); |