DEV Community

Discussion on: How do you like to unit test your code?

Collapse
 
joshualjohnson profile image
Joshua Johnson

Love your explanation. I feel the same way about testing. I much rather prefer not to mock at all. Unless you rely on an environmental dependency that HAS to be mocked.

Collapse
 
sebastientorres profile image
sebastientorres

Thanks!
Mocking stuff can be a real pain and takes a lot of time to work out if everything needed for the test is available (mocked).

Thread Thread
 
joshualjohnson profile image
Joshua Johnson

Lol! Takes more work sometimes to do that than to just run it fully integrated.