Please help to write unit testing on router.url usging angular 2. Please have a look at the below code to understand my query.
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-about',
templateUrl: './app-about.component.html',
styleUrls: ['./app-about.component.scss']
})
export class AboutComponent implements OnInit {
constructor(private router: Router) {
if (this.router.url.includes('home')) {
...some functions
}
}
}