Angular component test harnesses FTW
Description
Do you want component unit tests that are easier to write and maintain - tests that don’t have to always query the template? This is possible when you use Angular CDK's test harnesses.
In this talk, we'll cover different types of testing methods, what test harnesses are, using Angular Material component test harnesses for immediate results, and how you can extend the CDK `ComponentHarness` to create custom component test harnesses. With the power of testing harnesses, you'll be able to write winning tests.
Key takeaways
Use test harnesses to write tests that are more robust, and easier to read, write, and maintain when using Angular Material components
Update existing tests to use Material component test harnesses as part of MDC updates
Leverage CDK testing framework to create test harnesses for your custom components
Always test your custom component test harness interactions
Minimize component complexity for better architecture practices and simplify testing
About Alisa
Alisa Duncan is a Senior Developer Advocate at Okta, a full-stack developer, and a community builder who loves the thrill of learning new things. She is a Google Developer Expert in Angular, a Women Techmaker Ambassador, co-organizes AngularKC meetup, is on the core team of ngGirls, and helps lead an organization that teaches women web development basics. When not coding or volunteering, she enjoys cooking, watching K-Dramas, and drinking a glass of wine.
Learn more about Alisa at: