开发者

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();
  });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜