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
I'm updating all my addons to be v2 and use vite for testing (no separate ember test app 🥳).
However, that makes code coverage to stop working, as it is tightly coupled to ember-cli.
One solution would be to write that middleware to collect code coverage for vite.
It raises the question though, that it would still run with istanbul and the code fragments it injects for measuring. As for the ecosystem is currently moving more towards native node coverage (through v8), I was wondering if a step-by-step re-architecture might be more useful. In terms, running tests soon in vitest browser mode, wo/ the need for testem soon becomes an option (ok, vitest browser mode would still use istanbul :D).
But for the internals my knowledge is limited, but I want to throw the idea into the room of having multiple parts (packages?) that do various things and can be combined for the test setup one has chosen to. One such part would be do the main translation between gts and whatever istanbul/v8 would understand. Another part is testem middleware and a third one would be a vite plugin that uses them.
I agree on re-architecting. That's long been the thought and the reason this is somewhat stagnant. We'd like to use browser coverage. I know @wagenet spiked it at one point.
I suspect vitest browser mode is a ways off for our ecosystem. I've done testing and oddly enough testem is still one of the most reliable ways to test across browsers.
You've summarized the parts well. As far as I know this plugin primarily:
Facilitates instrumentation
Translates between gjs/gts and js
Maps files from the old build system so as to exclude source from addons
Provides the middleware that collects coverage and writes the output
Outputs coverage in the UI (if running via the UI of qunit)
In nearer term, I think a lot of what the addon does could be extracted into reusable parts that could be called directly from the host app or addon. The middleware could be used directly by testem rather than going through the ember-cli hook and the commands could work without ember-cli if we add our own command runner.
I suspect vitest browser mode is a ways off for our ecosystem. I've done testing and oddly enough testem is still one of the most reliable ways to test across browsers.
I'm using vitest browser mode since it early days on a vanilla project and they are maturing at intense speed. Luckily with emberjs/rfcs#1099 we can use vitest from ember, so it is not too far away. It is using istanbul under the hood, so with the gts/gjs translation they are supported. I read a skeet today teasering built-in visual regression today - I'm hyped.
For other tools, such testem there is other work to do, such as mapping, etc. However, I think, these are little pieces (not that much code I blindly assume right now).
So maybe, there is a ember-code-coverage package, with these public modules:
Activity
kategengler commentedon Jul 28, 2025
I agree on re-architecting. That's long been the thought and the reason this is somewhat stagnant. We'd like to use browser coverage. I know @wagenet spiked it at one point.
I suspect vitest browser mode is a ways off for our ecosystem. I've done testing and oddly enough testem is still one of the most reliable ways to test across browsers.
You've summarized the parts well. As far as I know this plugin primarily:
In nearer term, I think a lot of what the addon does could be extracted into reusable parts that could be called directly from the host app or addon. The middleware could be used directly by testem rather than going through the ember-cli hook and the commands could work without ember-cli if we add our own command runner.
gossi commentedon Jul 29, 2025
I'm using vitest browser mode since it early days on a vanilla project and they are maturing at intense speed. Luckily with emberjs/rfcs#1099 we can use vitest from ember, so it is not too far away. It is using istanbul under the hood, so with the gts/gjs translation they are supported. I read a skeet today teasering built-in visual regression today - I'm hyped.
For other tools, such testem there is other work to do, such as mapping, etc. However, I think, these are little pieces (not that much code I blindly assume right now).
So maybe, there is a
ember-code-coveragepackage, with these public modules:ember-code-coverage/istanbulember-code-coverage/viteember-code-coverage/testemember-code-coverage/babelkategengler commentedon Feb 17, 2026
@gossi Are you interested in pursuing this?
gossi commentedon Feb 17, 2026
Potentially yes, I still have it on my radar because I want it (which is the biggest motivator I guess 😁).
I'm currently finishing a backend project, then this is a candidate again (there is also this one: embroider-build/embroider#2658)
I'd reach out to you in discord, if this becomes idea materializes. Anyway ask me again in one month.
That excludes template coverage. More the infra as proposed, with the current feature set.
NullVoxPopuli commentedon Feb 23, 2026
is here: https://github.com/nullVoxPopuli/ember-vitest
needs folks testing it out so it can become more robust tho
feat: strict-mode template coverage, standalone CLI, and /core export
feat: strict-mode template coverage, standalone CLI, and /core export