Angular Component Tests: setInput, outputs, whenStable in Zoneless Apps, @defer and Host Components
In Angular 22, old tests that assign through componentInstance and call detectChanges fail, because default OnPush and the zoneless fixture only process changes Angular is notified about; pass values with setInput and read the DOM after whenStable. With Bookstore's BookCard, QuantityInput, CartSummary and CatalogPage components we cover outputs, model(), content projection, @defer and getLastFixture, all with real runs.
14 Nov 2026
·
12 min
·
12