| 419 | } |
| 420 | |
| 421 | @Component({ |
| 422 | selector: 'my-app', |
| 423 | template: '<my-comp [name]="name"></my-comp>', |
| 424 | imports: [MyComponent], |
| 425 | changeDetection: ChangeDetectionStrategy.Eager, |
| 426 | }) |
| 427 | class MyApp { |
| 428 | @ViewChild(MyComponent) comp!: MyComponent; |
| 429 | name: string = 'Nancy'; |
| 430 | } |
| 431 | |
| 432 | it('should check OnPush components on initialization', () => { |
| 433 | TestBed.configureTestingModule({imports: [MyComponent, MyApp]}); |