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
Is there a way to create a function spy with Brain Monkey?
Given this function:
myFunction() {
myOtherFunction();
}
Instead of this 'mock' expectation:
it('should call my other function', function() {
Functions\expect('myOtherFunction')->once();
myFunction();
});
I would like to write this 'spy' expectation:
it('should have called my other function', function() {
Functions\spy('myOtherFunction');
myFunction();
Functions\expect('myOtherFunction')->shouldHaveBeenCalled()->once();
});
The text was updated successfully, but these errors were encountered:
Is there a way to create a function spy with Brain Monkey?
Given this function:
Instead of this 'mock' expectation:
I would like to write this 'spy' expectation:
The text was updated successfully, but these errors were encountered: