-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
refactor: Moving from jest to vitest #9035
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
New dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No new dependency issues detected in pull request Bot CommandsTo ignore an alert, reply with a comment starting with Pull request alert summary
📊 Modified Dependency Overview:
🚮 Removed packages: @types/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 114 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 05/24/2023 11:34:59pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 27ef504 Started: 05/24/2023 11:20:58pm UTC
|
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Reschedule Tests -- new-booker Should do a booking request reschedule from /bookings
Retry 1 • Initial Attempt |
0.77% (3)3 / 388 runsfailed over last 7 days |
1.80% (7)7 / 388 runsflaked over last 7 days |
Reschedule Tests -- old-booker Opt in event should be ACCEPTED when rescheduled by OWNER
Retry 1 • Initial Attempt |
0% (0)0 / 375 runsfailed over last 7 days |
2.40% (9)9 / 375 runsflaked over last 7 days |
📄 apps/web/playwright/event-types.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Event Types tests user -- old-booker can duplicate an existing event type
Retry 1 • Initial Attempt |
0% (0)0 / 394 runsfailed over last 7 days |
1.27% (5)5 / 394 runsflaked over last 7 days |
📄 apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Embed Code Generator Tests Event Type Edit Page open Embed Dialog for the Event Type
Retry 1 • Initial Attempt |
3.27% (13)13 / 397 runsfailed over last 7 days |
29.97% (119)119 / 397 runsflaked over last 7 days |
📄 apps/web/playwright/booking-seats.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Booking with Seats -- new-booker Reschedule for booking with seats -- old-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 1 • Initial Attempt |
0% (0)0 / 406 runsfailed over last 7 days |
85.47% (347)347 / 406 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should be able to reschedule
Retry 2 • Retry 1 • Initial Attempt |
9.09% (1)1 / 11 runfailed over last 7 days |
36.36% (4)4 / 11 runsflaked over last 7 days |
I'm loving this! Nice job @leog Just for completeness sake. What are the drawbacks of abandoning jest in our codebase? |
@@ -7,6 +7,7 @@ public | |||
|
|||
*.lock | |||
*.log | |||
*.test.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests need to import prisma before the actual code using prisma gets run, and Prettier was reorganizing the imports everywhere breaking this. I added this to avoid prettier reorganizing imports in tests.
}); | ||
|
||
it("should filter cities for a valid city name", () => { | ||
expect(filterByCities("San Francisco", cityData)).toMatchInlineSnapshot(` | ||
Array [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had always thought why it was needed. Now, vitest removing it ❤️
happy to merge once open questions were answered. changes can be done in a follow up PR |
…to chore/vitest-migration
@zomars There is no apparent drawback other than immersing ourselves into a new framework which can lead to unknowns although Vitest is being used more and more these days. Not to mention Vitest has been designed with a Jest compatible API. More info about migration and similarities/differences here. All in all, I think we should give it a chance, the time difference is huge, and locally is ludicrous, see: |
What does this PR do?
Moving unit testing framework from Jest to Vitest in order to speed things up.
Going from this:

To this:

Marking a 85.3% decrease in time, even running more tests than Jest.
Type of change