-
Notifications
You must be signed in to change notification settings - Fork 108
Migrate to Vitest, TypeScript 5.9, NodeJS 22 #1815
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
Conversation
# Conflicts: # package.json # src/parser/__tests__/disallowed-syntax.test.ts # src/repl/utils.ts # src/utils/operators.ts # tsconfig.json # yarn.lock
…nto vitest-testing-refactor
This reverts commit 4390454.
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.
LGTM, thanks a lot! There are very minor TODOs but they can be done in a future PR since I don't want to have to look through 300 files and 20k lines of changes again…
Can't wait to go into TS v5
| // TODO: The snapshots just never match for whatever reason | ||
| describe.skip('Test output options', () => { |
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.
Did you figure this out?
| @@ -1,5 +1,7 @@ | |||
| // TODO: Convert to actual benchmark | |||
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.
Did you get around to this?
| @@ -1,4 +1,6 @@ | |||
| #!/usr/bin/env node | |||
| /* istanbul ignore file */ | |||
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.
Aren't we using v8 instead of istanbul for coverage?
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 can't figure out why snapshots are not generated for this file (and also svmc.test.ts when I unskip locally). But it's minor and can always fix later.
This reverts commit 2f072b3.
Migrate to Vitest
Following the modules repo and frontend, this PR migrates the repository to Vitest. I've tried to minimize changes where possible since Vitest was designed as a drop in for Jest, but unlike Jest Vitest requires calls to
toMatchInlineSnapshotto be directly fromexpect.Relocation of Enums
The Chapter, Variant, ErrorType and ErrorSeverity enums needed to be relocated to other files to allow Vitest to actually work. I suspect it has something to do with the circular imports that aren't just elided during runtime.
I'm not sure if they should be re-exported through the
types.tsfile though.