-
Notifications
You must be signed in to change notification settings - Fork 2
test(NODE-4586): optional callback async wrappers #2
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
Conversation
79f9d5b to
b59790c
Compare
67e615e to
745512a
Compare
b59790c to
6a11426
Compare
ff9ef1f to
023a4c4
Compare
6a11426 to
b1ab63e
Compare
93901eb to
0d0558b
Compare
03fa0c5 to
6f9f4a4
Compare
3bf1999 to
25e1bec
Compare
baileympearson
left a comment
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.
This PR looks good overall, but I would like maybe_callback.test.js to have thorough comments explaining exactly what we're testing and how we're constructing the tests (like we discussed). I'll take another look once there are comments @nbbeeken
| }); | ||
|
|
||
| it('should return legacy listIndexes cursor', () => { | ||
| expect(collection.listIndexes()).to.be.instanceOf(ListIndexesCursor); |
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.
optional - this comment applies to all the custom tests in the legacy_wrappers folder. It's confusing at first glance to read this test, because I'd expect to.be.instanceOf(LegacyListIndexesCursor) based on the test description.
I understand why it's not - because we're exporting the exact same names from the legacy driver as from the original driver. But we could consider not destructuring imports to make it more explicit:
const legacyDriver = require('../../../src/index')
...
expect(legacyDriver.collection.listIndexes()).to.be.instanceOf(legacyDriver.ListIndexesCursor);
baileympearson
left a comment
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.
two small comment suggestions but LGTM! 🔥
ed3f688 to
4ee81c3
Compare
NODE-4520 / NODE-4586