Reputation: 93
I am trying to write test case for below the code in angular. I am new for test case.So, How to write it in the app.component.spec.ts file? I tried but not working.
app.component.ts:
public arr:[]= [
{
name:'test',
link:'demo'
}];
public dateCheck:number = Date.now();
public ifFoo:boolean = true;
app.component.spec.ts:
it('should verify arr',() => {
component.arr= [
{
name:'test',
link:'demo'
}];
});
it('should verify dateCheck',() => {
component.dateCheck = Date.now();
});
it('should verify isFoo',() => {
component.isFoo= true;
});
Upvotes: 0
Views: 42