Skip to content

Conversation

@aslilac
Copy link
Member

@aslilac aslilac commented Oct 29, 2025

Migrates the majority of tests that will be "easy" to migrate; 201 tests specifically. This leaves 399 tests running under Jest.

  • Many of the tests are broken because of something to do with our renderWithAuth function, and I imagine hunting down that issue alone would fix another couple hundred.

  • I imagine another large chunk of tests will be relatively easy to automate with an agent. Translating things where the Vitest API is similar to Jest's but not quite 1:1.

  • I think some tests are going to be a pain to migrate, but probably < 100. While converting these we should continue to evaluate how much value we're getting out of them vs maintenance burden, considering if Storybook and our e2e tests already give us sufficient coverage or not.

@aslilac aslilac changed the title chore: begin migrating from jest to vitest chore: begin migration from jest to vitest Oct 30, 2025
@aslilac aslilac changed the title chore: begin migration from jest to vitest chore: migrate some tests from jest to vitest Oct 30, 2025
Comment on lines +147 to +148
it("validation passes for all timezones", () => {
for (const zone of timeZones) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I converted this to a for loop because this feels like one test, but before it was basically being treated as almost six hundred tests. "number of tests" isn't a great metric, but having over half of our "tests" coming from this < 10 loc skews that metric into "incredibly misleading" territory, which isn't great.

@aslilac aslilac requested a review from jaaydenh October 31, 2025 00:12
@aslilac aslilac marked this pull request as ready for review October 31, 2025 00:12
"test:watch": "jest --selectProjects test --watch",
"test": "vitest run && jest",
"test:ci": "vitest run && jest --silent",
"test:watch": "vitest",
Copy link
Contributor

@jaaydenh jaaydenh Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw you removed test:coverage, have we ever actually used that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope! 😄 and coverage reporting right now would be broken anyway, since each test framework is only seeing part of the story.

Copy link
Contributor

@jaaydenh jaaydenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the tests and seems to be working fine. 👍

Im curious if the deleted tests are not relevant anymore or if there were other reasons to remove them.

@aslilac aslilac merged commit c627a68 into main Oct 31, 2025
30 checks passed
@aslilac aslilac deleted the lilac/vitest branch October 31, 2025 21:15
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants