PER-10670: Switch to vitest#789
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #789 +/- ##
==========================================
- Coverage 98.56% 97.86% -0.70%
==========================================
Files 109 124 +15
Lines 2783 5583 +2800
Branches 462 1059 +597
==========================================
+ Hits 2743 5464 +2721
- Misses 36 117 +81
+ Partials 4 2 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
58d42f9 to
d9ddc4a
Compare
|
The codecov difference here seems to come from differences in how jest and vitest count coverage, not from any actual reduction in coverage. |
b5ba73c to
03b784a
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
This looks straightforward and the tests are passing. I have a question about the import setup inline.
| @@ -1,5 +1,6 @@ | |||
| import request from "supertest"; | |||
| import { when } from "jest-when"; | |||
| import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; | |||
There was a problem hiding this comment.
It looks like we imported these from jest in some central location and have to import them in each file from vitest -- is that expected?
There was a problem hiding this comment.
Yes, this is a difference in philosophy between jest and vitest. Jest imported a bunch of stuff automatically, vitest wants you to be explicit
|
Some Claude review comments: |
I think it's correct for event_utils to not have a vitest config if it doesn't have tests. I've fixed the other things noted here (except the last one, which doesn't have a fix) |
7d57868 to
a5f2a86
Compare
Jest doesn't officially support ESM. We'd like to move this repo to ESM, as that appears to be the way of the future (and we have some dependencies that in their latest releases only offer ESM support). To that end, this commit replaces Jest with Vitest.
a5f2a86 to
1980c41
Compare
Jest doesn't officially support ESM. We'd like to move this repo to ESM,
as that appears to be the way of the future (and we have some
dependencies that in their latest releases only offer ESM support). To
that end, this commit replaces Jest with Vitest.