Hi Team,
I have simple class with parameter construnctor and statics methods.
Class test {
static add( num1 , num2) : number
{
retrun num1 + num2;
}
constructor(_id: number , _id2: number , _name: string , _endDate: Date ) {
this.rid = _id;
this.id2= _id2;
this.name= _name;
this.endDate = _endDate }
}
How can write unit test with jasmin karma i tried but getting issue while using method
describe('add test ' , () => {
it('should add numbers ', () => {
const result = model.add(1,2);
expect(result).toBe(3);
});
});
Issue : "Property 'add' is a static member of type 'test'"