Join GitHub today
[feature] Spy passes through calling with `new` #1626
This changes the spy behavior so that if the spy is
This was throwing an error if you tried spying on an ES6 class object.
How to verify
Checklist for author
Thank you! I had a hard time understanding what was going on, so needed to play with the code and run it in a debugger and examine it before I could accept it. Made a tiny change, but your test was sufficient to prove everything still worked.
Since the everything done here logically belonged in one commit it was ok that the history was a bit messy, as I could squash everything, including my commit. And yes, the unit test you added was fine :-)