I'm trying to write a test within a file called fooTest that's trying to check if, in the file foo, when I call fooHandler, a function in the file bar is called.
I've been able to test that the function in bar is called. (barSpy = sinon.spy(), and then adding the path and the spy as a stub to Proxyquire) However, an existing test is now breaking -- the existing test checks the output on a function that uses bar, but I think the spying is messing with the behavior. How can I address this?
Thanks in advance!