-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add Transaction mocks #38
Conversation
Fixed merge conflicts in firestore.js |
const mockUpdateTransaction = jest.fn(); | ||
const mockDeleteTransaction = jest.fn(); | ||
|
||
class Transaction { |
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.
Should this class also have getAll
?
https://googleapis.dev/nodejs/firestore/latest/Transaction.html#getAll
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.
It definitely should! I must've overlooked that.
The logic for that might be complicated. Could we perhaps add it in another PR after this series is through?
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.
It's probably just a loop over each provided ref. It shouldn't be too bad to throw that in this branch. Gimme a sec...
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.
Added in the latest commit. What do you think?
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.
Thank you for adding all of this 🙌
Thanks! #39 is ready for review |
Description
We now mock over
Firestore.Transaction
. This branch adds mocks (all exported through firestore.js as usual) for the usualfirestore.transaction
API calls.Related issues
Depends on #37
How to test