-
Notifications
You must be signed in to change notification settings - Fork 0
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
29: Tests with Vitest #84
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.eslintrc.json - removed a no-unpublished-import error package.json - added a test command for npm that runs vitest vite.config.js - now includes reference to vitest Rectangle.test.ts - functioning test, woohoo! Please look over ASAP to make sure I didn't touch anything I shouldn'test have. Will update the README with instructions/common mistakes I made.
RyanR712
changed the title
One test working with vitest, config changes
29: Tests with Vitest
Oct 7, 2023
RyanR712
added
the
required
This feature is required to be implemented by the current implementation team
label
Oct 7, 2023
4 tasks
Odd note, if you try and put a tests folder in the root directory, vitest looks for tests only in /src/ anyway. Might have to do with something in vite.config.js? Line 6, maybe?
package.json - live-test and test are now separate commands "npm run test" no longer requires the user to press q to quit README.md - proper description of test tsconfig.json - includes all .ts files in /tests/ Rectangle.test.ts - added second test to test vitest test test test Ellipse.test.ts - added one test to test vitest with multiple test files Point.ts - updated documentation
Created .yml file that runs all vitest tests
Point.test.ts: tests for accurate construction, setting new values to an existing Point, and a Point's distance with itself Point.ts - toString() now produces a string that looks like a Cartesian point, distance method moved here from EllipseCreation.ts EllipseCreation.ts - moved the distance method to Point, changed a method call accordingly
…/RAIRLab/Peirce-My-Heart into 29-using-vitest-for-unit-testing
Will look at test.each() next
Point.test.ts - test.each now compacts some otherwise repetitive testing committed AEGTree.ts - added author tags and changed documentation AtomNode.ts - changed documentation
All around - @author tags for me, so fake Ryan doesn't strike again Point.ts - updated documentation for two functions, added isFinite() checks Rectangle.ts - constructor now accepts null for a starting vertex, toString() format change, documentation changes, isFinite() and positiveness checks Point.test.ts - made more use of test.each, test.fails clauses to make sure some constructions fail Rectangle.test.ts - additional basic tests, better organization via test.each
Rectangle.ts - added ?: to all parameters Rectangle.test.ts - modified tests accordingly
Point.ts - slight documentation update Rectangle.test.ts - added getCorners() and containsPoint() tests
AEGUtils.ts - pointInELlipse() => pointInEllipse(), changed function calls accordingly Ellipse.ts - changed import and function call according to above CutNode.ts - documentation for toFormulaString(), credited this "James Oswald" character Rectangle.test.ts - changed containsPoint() tests to no longer expect points on the edges of Rectangles to pass
Rectangle.test.ts: - condensed some string args sent to test()s - overlaps, contains, toString describe() sections - the tests only get more comprehensiver from here
Ellipse.ts - moved toString() to bottom of file, changed toString() format, added isFinite()/isPositive checking in constructor Rectangle.test.ts - skeletons added for Rectangle-on-Ellipse contains()/overlaps() checking, small changes Ellipse.test.ts - constructor, containsPoint(), toString(), Ellipse-on-Rectangle overlaps() and Ellipse-on-Rectangle contains() implementations, Ellipse-on-Ellipse skeletons
README.md - changed some excessive wording, added .npmignore to the source file explanation chunk Rectangle.test.ts, Ellipse.test.ts - expanded on existing tests
James-Oswald
approved these changes
Oct 11, 2023
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 we're good on rectangle.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
New feature
required
This feature is required to be implemented by the current implementation team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
.eslintrc.json - removed a no-unpublished-import error
package.json - added a test command for npm that runs vitest
vite.config.js - now includes reference to vitest
Rectangle.test.ts - functioning test, woohoo!
Please look over ASAP to make sure I didn't touch anything I shouldn't have.
Will update the README with instructions/common mistakes I made.
Going to merge master into this now as well.