Closed mehroosali closed 4 years ago
How do i stub the methods of this package using sinon stub?
i have tried doing, let Credstash = require('nodecredstash') let credstashStub = sinon.stub(Credstash.prototype, 'getSecret')
but gives me error 'TypeError: Cannot stub non-existent own property getSecret'. any help would be appreciated?
used proxyquire for mocking. solved the issue.
How do i stub the methods of this package using sinon stub?
i have tried doing, let Credstash = require('nodecredstash') let credstashStub = sinon.stub(Credstash.prototype, 'getSecret')
but gives me error 'TypeError: Cannot stub non-existent own property getSecret'. any help would be appreciated?