We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdc5744 commit 5d7348bCopy full SHA for 5d7348b
src/__tests__/cache.test.js
@@ -152,6 +152,15 @@ describe('createCachingMethods', () => {
152
expect(collection.find.mock.calls.length).toBe(1)
153
})
154
155
+ it('finds by ObjectID field', async () => {
156
+ const foundDocs = await api.findByFields({ _id: ObjectId(hexId) })
157
+
158
+ expect(foundDocs[0]).toBe(docs.one)
159
+ expect(foundDocs.length).toBe(1)
160
161
+ expect(collection.find.mock.calls.length).toBe(1)
162
+ })
163
164
it('finds by array field', async () => {
165
const foundDocs = await api.findByFields({ tags: 'bar' })
166
0 commit comments