Skip to content
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

Update CRUD Tests #1622

Merged
merged 10 commits into from
Dec 21, 2017
Merged

Update CRUD Tests #1622

merged 10 commits into from
Dec 21, 2017

Conversation

jlord
Copy link
Contributor

@jlord jlord commented Dec 19, 2017

This updates the CRUD tests in these ways:

  • Fixes bulkWrite to pass on arrayFilters
  • Fixes insertMany to return insertedIds in the correct format
  • Adds tests for bulkWrite, insertOne and insertMany
  • Updates the tests files from the specification directory.

For review ease, skip the first commit which dumps the new files in ✨

🍍

NODE-1228

@mbroadst
Copy link
Member

@jlord and I spoke offline about this, my general comments are that we need update the inline documentation, and also update the migration guide indicating that this is a breaking change

@@ -724,7 +714,7 @@ define.classMethod('bulkWrite', { callback: true, promise: true });
* @typedef {Object} Collection~insertWriteOpResult
* @property {Number} insertedCount The total amount of documents inserted.
* @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
* @property {ObjectId[]} insertedIds All the generated _id's for the inserted documents.
* @property {ObjectId[]} insertedIds Map of the index of the inserted document to the id of the inserted document.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change the jsdoc type to {Object.<string, ObjectId}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, but I think its actually {Object.<Number, ObjectId>}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mbroadst
Copy link
Member

@jlord this needs to be rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants