DEV Community

Ben Halpern
Ben Halpern Subscriber

Posted on

76 12

2 unit tests. 0 integration tests.

Top comments (17)

Collapse
 
yaser profile image
Yaser Al-Najjar β€’ β€’ Edited

"IT WORKS ON MY MACHINE"
(although I see a container right there 😁)

Collapse
 
integerman profile image
Matt Eland β€’

Containerization fixes everything!

Collapse
 
benjamindavies profile image
Benjamin Davies β€’

Only if it's in the container

Collapse
 
balajik profile image
Balaji K β€’

Clear cache and try again πŸ˜‰

Collapse
 
mohammedaliroc1 profile image
MOHAMMEDALI β€’

🀣🀣🀣🀣

Collapse
 
victoryarema profile image
Victor Yarema β€’ β€’ Edited

Not quite. Not always. I remember really many cases when integration tests are not needed simply because that specific integration logic will be checked with any single smoke test.
To be more precise the situation on the photo has absolutely nothing to do with integration testing. It would fail exactly the same in case of unit test like "put the car on top of the box and lift it".

Collapse
 
xgenvn profile image
Brian Ng β€’ β€’ Edited

Depend on described use cases, this is undocumented user behavior!

Collapse
 
peledzohar profile image
Zohar Peled β€’

Users. If we could only do without them, what a wonderful world it could be :-)

Collapse
 
katylava profile image
katy lavallee β€’ β€’ Edited

I was having trouble explaining integration vs unit test to my mentee once, and I showed her a couple of these jokes and she instantly understood.

Collapse
 
yeneme profile image
Yene β€’

Expected behaviour

Collapse
 
allindeveloper profile image
Uchendu Precious β€’

Just handle exceptions properly.

Collapse
 
itachiuchiha profile image
Itachi Uchiha β€’

Use CTRL+R

Collapse
 
david_j_eddy profile image
David J Eddy β€’

This is great!

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free β†’