-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
test(nodeOps): rename file, fix type errors, add tests #637
Conversation
✅ Deploy Preview for tresjs-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey @alvarosabu ! I increased test coverage of nodeOps to about 90%.
|
Hi @andretchen0 thanks a lot for submitting this PR, I'm so happy to have proper coverage, especially on the
Yes, that is going to disappear (check #515) You would need to change the origin to |
Whoops! Thanks for the heads up! Fixed. |
Problem
src/core/nodeOps.ts
has a test file, but it's callednodeOpts.test.ts
– note the extra 't'.Solution
Rename to
src/core/nodeOps.test.ts
.Problem
The test file had a lot of type errors.
Solution
Fix most type errors.
Problem
The test file was organized in a flat hierarchy, leading to a lot of repetition of names
createElement should ...
.Solution
Group tests using
describe
Problem
There's no way to easily see test coverage.
Solution
Add test coverage plugin to Vitest and add to
pnpm run test:ui
script.Here's how to use it in the UI.
Problem
nodeOps test coverage is about 50%, which makes changes riskier than they could be.
Solution
Improve test coverage
closes #631