rspieker / jest-transform-svelte

Jest Transformer for Svelte components
35 stars 7 forks source link

[Q] not getting 100% code coverage on svelte conditions #10

Open dweidenfeld opened 5 years ago

dweidenfeld commented 5 years ago

Hi,

I know this is kind of a duplicate issue, but I still don't know how to solve the issue.

Please take a short look at: https://github.com/sveltejs/svelte/issues/3655 I am still not able to get 100% code coverage.

Thanks for help

rspieker commented 5 years ago

From the looks of the coverage output you've put in https://github.com/sveltejs/svelte/issues/3655 I get the impression that the props you send in are not applied (the red background without any numbers in the gutter states as much as "statement never reached").

There could still be several reasons this is happening, I don't know what you've tried so far, but you could look into:

If that still doesn't solve the issue it could mean that the code itself isn't working (I think it is, you probably also verified this manually), or there's some issue with the compilation that the coverage framework doesn't pick up (for example, I seem to run into issues with Sveltes' label syntax)

sibrha commented 3 years ago

it because you pass props object, try this render(Nav, { segment: "about" });