-
-
Notifications
You must be signed in to change notification settings - Fork 529
Upgrade to Vitest v3 #2168
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
Upgrade to Vitest v3 #2168
Conversation
|
✅ Deploy Preview for openapi-ts canceled.
|
size-limit report 📦
|
@@ -127,7 +127,7 @@ describe("transformSchemaObject > string", () => { | |||
async () => { | |||
const result = astToString(transformSchemaObject(given, options)); | |||
if (want instanceof URL) { | |||
expect(result).toMatchFileSnapshot(fileURLToPath(want)); | |||
await expect(result).toMatchFileSnapshot(fileURLToPath(want)); |
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.
Love all these cleanups. The test output had quite a lot of unnecessary warnings.
Does this PR clean up all of them? If so, it would be pretty great to switch these from warnings to errors in the vitest config to prevent new ones from sneaking in.
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'd be glad to make these errors, but I'm not finding a relevant Vitest config option to do that. If you know of one, would you mind sharing a link to its docs?
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'm going to merge for now, but am happy to add additional rules once we find them!
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.
The way I typically handle this isn't in vitest, but with the no-floating-promises
typescript-eslint rule.
Changes
Upgraded Vitest.
How to Review
How can a reviewer review your changes? What should be kept in mind for this review?
Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)