Skip to content

Commit

Permalink
Explicitly do not support 'updateOne' for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris927 committed Dec 10, 2017
1 parent b28e8c9 commit 7fcdb24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/__tests__/wait-for-updates.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ describe('domainMongo', () => {
'bulkWrite',
'initializeOrderedBulkOp',
'initializeUnorderedBulkOp',
'replaceOne'
'replaceOne',
'updateOne'
]
for (let fn of notSupportedFns) {
it(`fails on ${fn}, currently not supported`, async () => {
Expand Down
1 change: 1 addition & 0 deletions src/domain-mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const wrapCollectionObj = (original, collName, state) => {
case 'initializeOrderedBulkOp':
case 'initializeUnorderedBulkOp':
case 'replaceOne': // TODO: use findOneAndReplace instead?
case 'updateOne': // TODO: use findOneAndUpdate instead?
throw new Error(`${fnName} is not supported (but could be added if required).`)
default: // fall through
}
Expand Down

0 comments on commit 7fcdb24

Please sign in to comment.