Skip to content

Commit

Permalink
Merge pull request reactioncommerce#6592 from tuanvu0995/feat/add-rep…
Browse files Browse the repository at this point in the history
…laceOne-to-mockCollection

feat: add replaceOne to mockCollection
  • Loading branch information
brent-hoover authored Oct 25, 2022
2 parents 1bd735b + 8854252 commit 95bc16a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shaggy-feet-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@reactioncommerce/api-utils": minor
---

feat: add replaceOne mock function to mockCollection in the api-untils plugin
3 changes: 2 additions & 1 deletion packages/api-utils/lib/tests/mockCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default function mockCollection(collectionName) {
matchedCount: 1,
modifiedCount: 1
})),
updateMany: jest.fn().mockName(`${collectionName}.updateMany`)
updateMany: jest.fn().mockName(`${collectionName}.updateMany`),
replaceOne: jest.fn().mockName(`${collectionName}.replaceOne`)
};
}

0 comments on commit 95bc16a

Please sign in to comment.