How to test an anonymous function written inside super method in Angular
Let's visit this code:
export class Child extends Base
{
constructor(){
super();
this.getSomething();
}
getSomething(){
super.setValue(**(value)=>{
return value,
})**
}
}
How to cover the test coverage for the code written between **?
I wrote this much code but is not covering the code written between **.
import { Child } from "./Child";
describe("Child", () => {
it("should create an instance", () 开发者_如何学Go=> {
expect(new Child()).toBeTruthy();
});
});
精彩评论