Open dweidenfeld opened 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:
Nav({ target: your-element-reference, props: { segment: 'about' }})
(the main challenge here is to create and/or obtain an element reference), if this solves the coverage issue I think the problem is narrowed down to testing-framework/svelte.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)
it because you pass props object, try this render(Nav, { segment: "about" });
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