Skip to content Skip to sidebar Skip to footer

Using Sinon Mocks With Nodeunit

I'm learning to use sinon with nodeunit, specifically to do mocking. The recommended approach is to use sinon-nodeunit. According to the documentation, mocks should be available

Solution 1:

require.path was removed in node 0.5.x and higher, which sinon-nodeunit uses. Christian Johansen just pushed a change in sinon-nodeunit which should be compatible with node 0.6.2 (and 0.5.x-series) which should fix this... It's already available on sinon-nodeunits github page, still hasnt hit npm though...

update: should be mentioned that sinon-nodeunit has been discontinued, as the creator is full focused on BusterJS which IMHO is a much better framework.

Post a Comment for "Using Sinon Mocks With Nodeunit"