async method reducing the coverage under branches

47 views Asked by At

Here's my code:

it('test method', async () => {
    const self = {}
    const a = await identityModule.init(self);
    expect(a).to.equal("abc")
  });

enter image description here Note that the coverage is 100% under branches.

However, when I change the method to async, it reduces the coverage under branches. And I don't see any conditions and branching. So unable to figure out.

Also, note that line # 2 gets unusually invoked to 122x in that case.

enter image description here

I believe this started happening since I configured .babelrc to Trans compile some of the files.

0

There are 0 answers