Open spencersteers opened 5 days ago
It should similar to Next.js. The client side coverage should be collected by playwright. Could you please provide a minimal reproduction repo for your remix issue? so i can reproduce it and debug the issue. Thanks
https://github.com/spencersteers/remix-monocart-coverage-example
Thank you so much!
It seems that Remix will remove all server side code from client bundles see https://remix.run/docs/en/main/guides/gotchas#server-code-in-client-bundles
So there is no coverage info for server side code from client side.
The lines are marked as covered by default if no coverage data.
For action()
:
After merged:
The action()
is marked as covered
I don't know how to fix it, any idea? Or asking help from the official Remix team, if they are willing to support code coverage.
Please try monocart-coverage-reports@2.10.5 and see if this issue has been fixed.
I also create a example repo for Remix, see https://github.com/cenfun/remix-with-playwright
It's working great! Thank you so much!
I could use some help getting accurate coverage for a remix app. I'm collecting playwright coverage with a fixture similar to this.
The issue I am having is with functions being marked as having coverage but shouldn't. For example, here is the original source:
In remix, the
action
export is server side only and is removed from the client build:The final coverage output includes
action
even though it is not included in the client build.I've spent awhile messing with this and would appreciate any help. Server side coverage is working great, just having issues with the client side.
Let me know if there is anything else I can provide — happy to setup a sample app too.
Thanks for all your hard work on monocart ❤️