Somehow, it fails to find the callback that I just defined for it!
There's no good documentation on how to remedy this. The callback taken by the method under test isn't supposed to return anything (we're doing async stuff).
UPDATE: I made that spies.Spy the object, not the dereference of a pointer. It now works, as in it doesn't panic, but now it throws error upon testing asynchronous function.
Upon testing a method that takes a callback function, to do some async operation, I use your library to create a spy:
The method under test has an implementation like this (although this is extremely simplified):
Immediately after calling the method that does that, I say :
spy.MatchMethod("Callback", spies.AnyArgs, "")
When I run the test, I get greeted with
Somehow, it fails to find the callback that I just defined for it!
There's no good documentation on how to remedy this. The callback taken by the method under test isn't supposed to return anything (we're doing async stuff).