jefflau / apollo-client-mock

Easily mock your apollo client for testing
MIT License
18 stars 8 forks source link

Possible Bug Fix: Default mock revolvers are not re initialized after each test run. #1

Closed jkdowdle closed 6 years ago

jkdowdle commented 6 years ago

Pass lodash.merge a shallow copy of mockResolvers instead of passing it directly.

jkdowdle commented 6 years ago

As related to this issue - https://github.com/jefflau/apollo-client-mock/issues/2

jefflau commented 6 years ago

Thank you for this. I was playing around with your test demo and couldn't figure out why that was happening, but I guess I was unaware that _.merge mutates the input object. That's weird behavior to me, but I guess this works as a nice work around.

I guess I should probably make some tests for this package since I guess some people are using it :). Is it okay if I copy your test repo into my repo as a basis for them?

jkdowdle commented 6 years ago

No problem! Yes, feel free to use whatever seems helpful from that repo. That certainly makes since about _.merge.

And I do find this package useful! I'll try to help out the best I can even if it is just a little! Thank you a ton!

jefflau commented 6 years ago

Thanks! Feel free to do so. I added your repo as tests. Feel free to add more tests if you run into any bugs or edge cases. I'm building the library as I use it for another project


From: jkdowdle notifications@github.com Sent: Wednesday, May 30, 2018 11:17:36 PM To: jefflau/apollo-client-mock Cc: Jeff Lau; State change Subject: Re: [jefflau/apollo-client-mock] Possible Bug Fix: Default mock revolvers are not re initialized after each test run. (#1)

No problem! Yes, feel free to use whatever seems helpful from that repo. That certainly makes since about _.merge.

And I do find this package useful! I'll try to help out the best I can even if it is just a little! Thank you a ton!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/jefflau/apollo-client-mock/pull/1#issuecomment-393201233, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABKiFW3WCjnm95GFmrVOchnb31HdOkH6ks5t3rgPgaJpZM4USIMS.