I am trying to test my node.js code using Mocha, Sinon, and chai.
var callback = function (err, resultSet) {
should.exist(resultSet);
stubbedExecuteSqlQuery.should.be.called;
done();
};
stubbedExecuteSqlQuery.yields(null, expectedResultSet);
db.getResults(param1,param2, user, callback);
when the above code gets executed, it throws an error :
Invalid Chai property: called. Did you mean "all"?
The code used to work fine on chai version ^3.5.0
but after my recent package upgrade to ^4.1.2
the code has stopped working and has started throwing such errors.
I tried searching for it on the internet but could not find any useful information.
Any help will be appreciated. Thanks in advance!