173
rated 0 times
[
179]
[
6]
/ answers: 1 / hits: 30309
/ 7 Years ago, thu, february 23, 2017, 12:00:00
I would like to re-stub someHandler.getStatus
, but I'm getting TypeError: Attempted to wrap getStatus which is already wrapped
..
it('is a test', function() {
sandbox.stub(someHandler, 'getStatus', function(callback) {
callback(null, {
value: 1
});
});
sandbox.stub(someOtherHandler, 'doSomething', function(callback) {
callback(null);
});
sandbox.stub(someHandler, 'getStatus', function(callback) {
callback(null, {
value: 0
});
});
});
More From » unit-testing