Closed bitomule closed 3 years ago
@bitomule Can you provide some example test in which you're planning to use Gagarin along with spyOn?
@apendua I use it when I need to check some method is called and also to return a fake response from that method. For example, a method that calls stripe api.
How should I do that with gagarin?
@bitomule The problem here is that when you execute some code with
server.execute(...);
client.execute(...);
it is run in the respective environment (client or server) so not really in your current node process. I understand that spyOn
makes most sense if you use it either on server or client, so you will need to make sure that the library is available in those environments, probabbly by creating a custom debugOnly
package and including it in your meteor project manually. I don't see any easier solution at the moment.
I'm moving from jasmine + velocity to gagarin but not sure how to do spyOn with gagarin. Any idea?