DEV Community

Discussion on: "I need to change this code, but it has no test"

 
nicoespeon profile image
Nicolas Carlo

Oh, I see! Indeed, that's an interesting way to do, thanks for sharing 😃

I wonder though: couldn't you use expect.any(…) to achieve the same, in your test code instead?

Thread Thread
 
lexlohr profile image
Alex Lohr

Not sure. Let me test later, have a bunch of meetings ahead now.

Thread Thread
 
lexlohr profile image
Alex Lohr

It actually seems to work.