-
Notifications
You must be signed in to change notification settings - Fork 21
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
Sample create delete api v2 #330
Conversation
…them to use on creation (this way we can make them all use the same transaction)
…d BasicModel methods and alternative usage of knex transaction
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
==========================================
+ Coverage 82.44% 82.65% +0.21%
==========================================
Files 102 107 +5
Lines 2831 2895 +64
Branches 300 306 +6
==========================================
+ Hits 2334 2393 +59
- Misses 451 457 +6
+ Partials 46 45 -1
Continue to review full report at Codecov.
|
jest.clearAllMocks(); | ||
}); | ||
|
||
it('create works correctly', async () => { |
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 don't see any tests for failure modes. Is there something we can test for?
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 don't really think there are any unit tests to add there since all BasicModel
does is do part of a query
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 tested in staging, it is working well in v1. Didn't test v2 in staging. Feel free to merge after figuring out if you want to address my comments about the unit tests or if it is ok as they are.
No description provided.