-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage for gjs/gts files do not work for embroider apps #407
Comments
More questions that answers. I only get test coverage when Adding your method of
Does seem to work. I get the gjs/gts files showing. But I dont know why because adding a
Which means the method should only be returning false all the time. However if I comment everything out and only return false all the time, it doesnt work. EDIT: Moving the console.log into the if prints the console all the time. Not sure why but the if is always true. gjs/gts files also seem to be correct on lines. All js/hbs versions are off by one line (have been for a long time for me) |
Thanks for digging in @cah-brian-gantzler! @vstefanovic97 do you know what might be going on here? |
@RobbieTheWagner it has something to do with how Embroider is copying over some files in some tmp dir, I didn't have time to fully investigate and come up with a proper solution due to work, but hope to get back to this soon |
I see some people in discord where also reporting that coverage only works when -s is applied. On a brand new app, it appears to work without the -s. Not sure why. On my full app it does not. Brand new app with embroider though is missing coverage for gjs/gts still. Will try adding the modifyAsset code from above |
@RobbieTheWagner, @cah-brian-gantzler I think I've identified several issues and fixes, working on adding better test cases for future. |
Great to hear. Looking forward to it. Appreciate your efforts. |
@vstefanovic97 you won’t need to ask for that from now on as you already contributed to this repo so CI will kick off automatically |
@cah-brian-gantzler, @RobbieTheWagner I just made a PR
|
Can we close this now? |
@cah-brian-gantzler we would appreciate if you could confirm v2.1.2 fixes issues reported here (except |
Will do that sometime today |
I have confirmed updating to 2.1.2 producing the expected results for gjs/gts when using Also want to note that the lines marked in the HTML are the correct lines. In the .js files they are off by one line. |
Is there something we need to do to make them the right lines? |
@cah-brian-gantzler just to confirm, this 1 line off issue is present only for components in .js format and not present for .gts/.gjs? |
That is correct. only .js. Here is a snippet from a gts file (you can see the Interesting, I am assuming that services (line 21) are not marked as accessed even though they are referenced (line 36). Makes sense, how would you know. Yet tracked variables (line 30) are. Are the 2 times (line 30) sets I wonder, since gets were at least 5 (line 37). Must be why the service isnt marked, Variables must be only marked as sets only. |
This issue, as is, can be closed. Will open another issue for the off by one. |
Upgraded to 2.1.1, the gjs/gts files do not appear in the coverage output.
This seems to be an issue with embroider.
@vstefanovic97 was able to reproduce the issue. Please update any more information here.
The text was updated successfully, but these errors were encountered: