Closed MechJosh0 closed 6 years ago
Thanks for the report. The issue is fixed and the fix is published in the latest Wallaby core version.
Note that there's only one issue that we have fixed (orange icon should appear for calc2), other things are working as expected:
\src\pink.js:calc2
should be orange
Fixed.
\src\pink.js:foo
should be greeen
This is working as expected because export statements are not highlighted for coverage purposes (similar to some other code constructs such as class
definitions, etc.).
The same statement is not highlighted in TypeScript either.
Note that statements like export const calc = ...
are highlighted because there is a variable (constant) declaration in those lines/statements.
\src\packages\core\index.ts:moduleDescription
should be orange
This is working as expected because the executed statement on the line is const moduleDescription = '...'
. The fact that the constant is not used doesn't change the code coverage.
Hope it makes sense. Please let us know if you have any questions regarding how Wallaby coverage works, we are happy to answer.
Thanks for the fix and information on the other concerns.
Issue description
\src\packages\core\index.ts
has 2 tests, (1)moduleName
iscore
and (2)calc()
is working\src\pink.js
has 2 tests, (1) default export isfoo
and (2)calc()
is workingBelow is Wallaby showing what is being tested:
\src\packages\core\index.ts
\src\pink.js
\src\pink.js
is showing green forcalc2
because it's being executed (exported), butcalc3
is showing as grey inside the function because it knows the function isn't being tested.\src\packages\core\index.ts
is the same as above, butcalc2
is orange because it can see the line is being executed but the ES6 function isn't being tested.What should happen
Both
\src\packages\core\index.ts
and\src\pink.js
are being tested in the same way. I would expect the colours to be the same.\src\pink.js:calc2
should be orange\src\pink.js:foo
should be greeen\src\packages\core\index.ts:moduleDescription
should be orangeWallaby.js configuration file
https://github.com/MechJosh0/nuls-js/blob/master/wallaby.js
Code editor or IDE name and version
PhpStorm: 2018.2.4
OS name and version
Windows 10