-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat(test): moving unit testing over to vitest #789
Conversation
@@ -1,5 +1,7 @@ | |||
import type { OASDocument } from '../../src/rmoas.types'; | |||
|
|||
import { describe, beforeAll, it, expect } from 'vitest'; |
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.
Vitest offers a globals option1 for automatically adding these methods to every unit test but I kind of prefer the explicitness of not doing that.
Footnotes
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.
no config! lovely
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.
couple minor comments below but LGTM overall! absolutely obsessed with the fact that there's no config file
"lint:docs": "npx -y alex .", | ||
"lint:types": "tsc --noEmit", | ||
"prebuild": "rm -rf dist/", | ||
"prepack": "npm run build", | ||
"prepare": "husky install", | ||
"pretest": "npm run lint", | ||
"prettier": "prettier --list-different \"./**/**.{js,ts,md}\"", |
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.
doesn't have to happen in this PR but thoughts on running prettier against everything?
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 think this is already doing that? we don't have any yaml files in here for testing flows
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.
Co-authored-by: Kanad Gupta <8854718+kanadgupta@users.noreply.github.com>
🧰 Changes
Vitest is fast as hell and drops our unit test execution time down by a crazy amount.
Before
Now