You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have stubed function that takes two or more callback arguments, eg. drag(moveCallback, startCallback, stopCallback) then I need to invoke more than one callback at test. For example I want to invoke startCallback(x, y) for saving drag start position and then moveCallback(dx, dy) for setting image position (move it) with function img.position(x, y). But when I write test like this
only the second callback (at position 1) is called. Is there possibility to invoke both callbacks (with stub's method that changes context of callback)?
The text was updated successfully, but these errors were encountered:
That's exactly what I need, but I didnt find that method in actual documenation (http://sinonjs.org/docs/). Now i tried to search it in sources (v1.7.3) and it is really there. Many thanks and could it be added to docs?
When I have stubed function that takes two or more callback arguments, eg.
drag(moveCallback, startCallback, stopCallback)
then I need to invoke more than one callback at test. For example I want to invokestartCallback(x, y)
for saving drag start position and thenmoveCallback(dx, dy)
for setting image position (move it) with functionimg.position(x, y)
. But when I write test like thisonly the second callback (at position 1) is called. Is there possibility to invoke both callbacks (with stub's method that changes context of callback)?
The text was updated successfully, but these errors were encountered: