Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('Navbar Component', () => {
- let router: Router;
- // Other definitions...
- beforeEach(async(() => {
- // Configuring Testbed etc...
- }))
- describe('routes A', () => {
- beforeEach(async(() => {
- router = TestBed.get(Router)
- router.navigate(['/', 'a']);
- }))
- it('should show the relevant links', async(() => {
- // Testing code
- }))
- })
- })
- this.router.events
- .subscribe((routerEvent: Event) => {
- if (routerEvent instanceof NavigationStart) {
- // Do stuff
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement