-
Couldn't load subscription status.
- Fork 177
Description
Hello,
This issue affects both lab14 and lab16 (didn't tried 15).
The problems is that code analysis is, in some way modifying the returning value of a function. It is a very simple function like this:
const trace = (msg) => (x) => (console.info(msg, x), x);When I run the test without code coverage it works as expected. When I run the test with code coverage activated then the return value of the function is undefined.
I'm using this function on a promise chain and the following function in the chain is destructuring the result value of the previous function and of course it is failing because it can not destructure undefined.
Here is a fully working GIST that you can use as playground:
https://gist.github.com/danielo515/22e33e3a4d48c0b60a4da16008cedd39
There is a branch called lab16 where you can test with lab 16
I'm very sure that the problem is code coverage of this function because if wrap the function between coverage on and off then everything works as expected and test passes:
// This is a simple but valid function
/* $lab:coverage:off$ */
const trace = (msg) => (x) => (console.info(msg, x), x);
/* $lab:coverage:on$ */Thanks and regards