You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Coverage for gjs/gts files do not work for embroider apps #407
Does seem to work. I get the gjs/gts files showing. But I dont know why because adding a console.log(relativePath); as the first statement shows that all the relative paths passed do not have the app name in them.
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)
@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
@RobbieTheWagner, @cah-brian-gantzler I think I've identified several issues and fixes, working on adding better test cases for future.
Hope to push the fixes soon.
Btw @RobbieTheWagner are you maybe able to give me permissions just to run CI by myself so I don't need to ping you every time tests fail on CI?
I hadnt noticed before but its only components, all other (controllers, routes, etc) are on the correct lines. It seems only components are off by one line (js components only. The gjs/gts versions are on the correct lines)
That is correct. only .js. Here is a snippet from a gts file (you can see the </template> at the top.
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.
Activity
cah-brian-gantzler commentedon Feb 27, 2024
More questions that answers.
I only get test coverage when
-sis added to theember t. Without it, no coverage is written. (See #403 (comment))Adding your method of
Does seem to work. I get the gjs/gts files showing. But I dont know why because adding a
console.log(relativePath);as the first statement shows that all the relative paths passed do not have the app name in them.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)
RobbieTheWagner commentedon Feb 28, 2024
Thanks for digging in @cah-brian-gantzler! @vstefanovic97 do you know what might be going on here?
vstefanovic97 commentedon Feb 28, 2024
@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
bgantzler commentedon Mar 10, 2024
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
vstefanovic97 commentedon Mar 11, 2024
@RobbieTheWagner, @cah-brian-gantzler I think I've identified several issues and fixes, working on adding better test cases for future.
Hope to push the fixes soon.
Btw @RobbieTheWagner are you maybe able to give me permissions just to run CI by myself so I don't need to ping you every time tests fail on CI?
cah-brian-gantzler commentedon Mar 11, 2024
Great to hear. Looking forward to it. Appreciate your efforts.
SergeAstapov commentedon Mar 11, 2024
@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
vstefanovic97 commentedon Mar 12, 2024
@cah-brian-gantzler, @RobbieTheWagner I just made a PR
#408
That I hope should resolve most of the issues.
It fixes:
throwUnlessParallelizable: true(ember-cli-babel)ember-template-imports(added tests for this)ember-template-imports(wasn't able to add test case but verified on my local) (added tests for this)RobbieTheWagner commentedon Mar 25, 2024
Can we close this now?
SergeAstapov commentedon Mar 25, 2024
@cah-brian-gantzler we would appreciate if you could confirm v2.1.2 fixes issues reported here (except
ember sscenario as it's separate)cah-brian-gantzler commentedon Mar 25, 2024
Will do that sometime today
cah-brian-gantzler commentedon Mar 25, 2024
I have confirmed updating to 2.1.2 producing the expected results for gjs/gts when using
COVERAGE=true ember t -s.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.
RobbieTheWagner commentedon Mar 26, 2024
Is there something we need to do to make them the right lines?
cah-brian-gantzler commentedon Mar 26, 2024
I hadnt noticed before but its only components, all other (controllers, routes, etc) are on the correct lines. It seems only components are off by one line (js components only. The gjs/gts versions are on the correct lines)
SergeAstapov commentedon Mar 26, 2024
@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?
cah-brian-gantzler commentedon Mar 26, 2024
That is correct. only .js. Here is a snippet from a gts file (you can see the
</template>at the top.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.
cah-brian-gantzler commentedon Apr 16, 2024
This issue, as is, can be closed. Will open another issue for the off by one.