-
Notifications
You must be signed in to change notification settings - Fork 513
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
Setup vitest as a dev-dependency to the plexus package #2561
Conversation
after going through the readme and getting to know more about the package, i would like to start by adding a few snapshots to test the why snapshot testing:
what comes to my mind right now,
later, i'll look into testing interactivity added by React. |
ok, i have pushed my first test with the proposed idea - snapshot, as html and comparing. another idea came to my mind right now, since its snapshots for components, it would be eaiser to have images to compare - then vitest, as i know doesnt provide any mechanism for it, another option would be to use an e2e framework, like playwright, it can generate images of the components, then we can compare them later within as well - the con is that its slower, we need to setup a brower (headless), in ci also it can take more time. i'll wait for your feedback to proceed further @yurishkuro |
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2561 +/- ##
=======================================
Coverage 96.63% 96.63%
=======================================
Files 255 255
Lines 7728 7728
Branches 2015 2017 +2
=======================================
Hits 7468 7468
Misses 260 260 ☔ View full report in Codecov by Sentry. |
it makes sense to move from snapshots since they can be long and hard to debug -
i'll investigate the bare
or we will go pr by pr for each steps, setup and then tests? in this case, let me finalise this pr as only vite setup. looking forward to your reply. |
Signed-off-by: mahdikhashan <[email protected]>
6918a7b
to
c4cd190
Compare
Open to suggestions. Right now jaeger-ui shows code coverage at 97%, which is fantastic level, with the caveat that it actually excludes all of plexus. So the DoD could be achieving a certain level of coverage in plexus such that the overall repo coverage is at respectable level. I don't know now realistic it is, what do you think? |
alrighty then, question that comes is whether the focus on coverage is realistic enough - all in all, i'm open to explore more after this pr. |
Which problem is this PR solving?
Part of #340
Description of the changes
setup vitest, add related dependencies like testing-library and vitest/web-worker
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test