DEV Community

Adam Crockett 🌀
Adam Crockett 🌀

Posted on

Why Spy with my little Chai

Recently my TDD moment clicked, so my first opinion on something has surfaced! Secondly I have to say I'm sorry for the awesome title (not sorry).

It strikes me that spies are not such a good thing in tests. If you have to spy then your code is not testable in the first place, otherwise you might want to write some integration style tests. Am I right? What do you think?

Top comments (0)