Monthly Archive: December 2016

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();...

0

How to run only one test in rspec

Mostly while developing its extremely convenient to be able to run just one particular describe block or it block. Rspec lets you do that using a combination of focus: true as well as adding...