I am trying to unit test a formControl's getTime(). I am getting an error
.getTime is not a function.
A snippet of the component file looks like:
import {FormControl} from @angular/forms;
@component({
selector: 'lorem-ipsum',
templateUrl: './lorem-ipsum.html'
})
export class LoremIpsumComponent implements OnInIt {
.....
...
..
.
magazineSubscriptionFrom = new FormControl({value: '', disabled: true});
magazineSubscriptionTo = new FormControl({value: '', disabled: true});
constructor (
....
) {}
ngOnInit() {}
verifySubscription() {
let test1 = this.magazineSubscriptionFrom.value.getTime();
...
..
.
}