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 have been able to successfully use vitest for integration testing of a node server, by calling the API endpoints using supertest. Additionally I am able to generate a code coverage report, all of which is great!
The full application is being tested from the UI by cypress, where I am also able to generate coverage reporting using a cypress plugin.
The issue I am having is to generate coverage for the backend when running the e2e tests from cypress, using the cypress native plugin fails as we are using ESM modules for the server, which is why vite works so well.
So my question is - how could I instrument the backend to generate code coverage reporting when running the cypress e2e tests? Is it possible to run the server application with vite/vitest?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have been able to successfully use
vitest
for integration testing of a node server, by calling the API endpoints usingsupertest
. Additionally I am able to generate a code coverage report, all of which is great!The full application is being tested from the UI by cypress, where I am also able to generate coverage reporting using a
cypress
plugin.The issue I am having is to generate coverage for the backend when running the e2e tests from
cypress
, using the cypress native plugin fails as we are using ESM modules for the server, which is whyvite
works so well.So my question is - how could I instrument the backend to generate code coverage reporting when running the
cypress
e2e tests? Is it possible to run the server application withvite
/vitest
?Beta Was this translation helpful? Give feedback.
All reactions