Closed dlech closed 1 year ago
Awesome, this would be really helpful for us! Do you know when this will be merged?
Hey. Would you be able to add a test that verifies this? Thanks.
Test has been added. I confirmed that it fails before the change and succeeds after the change.
I'll merge this into 3.0.0 when that is released (trying to release that asap), since there's a small chance of breaking existing tests.
By using
unshift
instead ofpush
, new callbacks are added to the "top" of the stack (sincefind
searches from the beginning of the array). This allow a second call tocalledWith()
to override a previous call. This is useful for one-off tests.Fixes #77.