| 445 | } |
| 446 | |
| 447 | @Component({ |
| 448 | selector: 'my-app', |
| 449 | template: '<my-comp [name]="name"></my-comp>', |
| 450 | standalone: false, |
| 451 | |
| 452 | changeDetection: ChangeDetectionStrategy.Eager, |
| 453 | }) |
| 454 | class MyApp { |
| 455 | @ViewChild(MyComponent) comp!: MyComponent; |
| 456 | name: string = 'Nancy'; |
| 457 | } |
| 458 | |
| 459 | it('should check OnPush components on initialization', () => { |
| 460 | TestBed.configureTestingModule({declarations: [MyComponent, MyApp]}); |