Hi,
I noticed that there is a new major mongodb driver 4.0.1. I got it when I hit npm install mongodb and I got the latest. But when I ran the tests I noticed a problem:
TypeError: The constructor should be a function.
at stub.createStubInstance (D:\work\project\node_modules\sinon\lib\sinon\stub.js:128:15)
at Sandbox.createStubInstance (D:\work\project\node_modules\sinon\lib\sinon\sandbox.js:74:52)
at Object.sinon.mongo.collection (D:\work\project\node_modules\sinon-mongo\lib\sinon-mongo.js:43:49)
Here is the sample code:
const sinon = require('sinon');
require('sinon-mongo');
describe("Sample class test", function () {
const mockCollection = sinon.mongo.collection({})
})
I guess the problem is from the mongodb version not the sinon version, because I have another project in which I use sinon@11.1.1 and mongodb@3.6.6 and everything is fine.
I noticed that in the peerDependencies is mentioned that "mongodb": ">= 3.1.13 < 4", so I was wondering if you plan to support mongodb@4.x.x. in the near future.
Thanks a lot :D !!!
Hi, I noticed that there is a new major mongodb driver 4.0.1. I got it when I hit
npm install mongodb
and I got the latest. But when I ran the tests I noticed a problem:Here is the sample code:
and my deps:
I guess the problem is from the mongodb version not the sinon version, because I have another project in which I use sinon@11.1.1 and mongodb@3.6.6 and everything is fine. I noticed that in the peerDependencies is mentioned that
"mongodb": ">= 3.1.13 < 4"
, so I was wondering if you plan to supportmongodb@4.x.x.
in the near future. Thanks a lot :D !!!