Learn How to Unit Test Angular Components with RouterTestingHarness

Опубликовано: 07 Октябрь 2024
на канале: Code Shots With Profanis
2,868
72

In this video, we'll explore how to use RouterTestingHarness to unit test #Angular components.

You will learn how to:
unit test a component that has the application's menu items
unit test a routed component: which is the destination of a navigation
unit test a routing component: which is the component that navigates to other components
unit test a functional guard with a less verbose approach

RouterTestingHarness has been released in v15.2.0 and is a powerful test helper that reduces the boilerplate code needed to test the component that uses Router navigations.

Chapters:
00:00 Intro
02:30 Unit Test a Component with the Application's menu items
07:06 Unit Test a Routing Component using RouterTestingHarness
15:11 Unit Test a Routed Component using RouterTestingHarness
25:28 Unit Test a functional guard using RouterTestingHarness
29:43 Thank you

✨ Code: https://github.com/profanis/codeShots...

******************************************************
Let's connect
******************************************************
Twitter:   / prodromouf  
LinkedIn:   / prodromouf  

#angular #learnAngular #angulartutorial #webdevelopment #webdeveloper #frontenddeveloper #frontenddevelopment #unittesting #softwareengineer