adapt-authoring-tags 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tests/TagsModule.spec.js +4 -4
package/package.json
CHANGED
package/tests/TagsModule.spec.js
CHANGED
|
@@ -478,16 +478,16 @@ describe('TagsModule', () => {
|
|
|
478
478
|
assert.equal(parentInsert.mock.calls.length, 1)
|
|
479
479
|
})
|
|
480
480
|
|
|
481
|
-
it('should pass through all arguments to
|
|
481
|
+
it('should pass through all arguments to findOne', async () => {
|
|
482
482
|
const { instance } = createInstance()
|
|
483
|
-
instance.
|
|
483
|
+
instance.findOne = mock.fn(async () => ({ _id: 'tag1', title: 'test' }))
|
|
484
484
|
const data = { title: 'test' }
|
|
485
485
|
const options = { validate: false }
|
|
486
486
|
const mongoOpts = { limit: 1 }
|
|
487
487
|
await instance.insert(data, options, mongoOpts)
|
|
488
|
-
const findArgs = instance.
|
|
488
|
+
const findArgs = instance.findOne.mock.calls[0].arguments
|
|
489
489
|
assert.equal(findArgs[0], data)
|
|
490
|
-
assert.
|
|
490
|
+
assert.deepEqual(findArgs[1], { validate: false, strict: false })
|
|
491
491
|
assert.equal(findArgs[2], mongoOpts)
|
|
492
492
|
})
|
|
493
493
|
})
|