Tagged: sinon.js

0

Cannot stub non-existent own property

The potential problem could be that sinon does not mock objects with dynamically-created methods through Object.prototype. To mitigate such problem, you can try the following : var sinon = require(‘sinon’); var sandbox = sinon.sandbox.create();...