r/ProgrammerHumor • • 9d ago

Meme thoseCodingEra

Post image
24k Upvotes

821 comments sorted by

View all comments

Show parent comment

2

u/AltrntivInDoomWorld 8d ago

a test shouldn’t be more than a few lines anyway.

doubles

initiation

runtime

asserts

that's already more than few lines you mentioned without even using true code. You are talking out of your arse

don't get me started on mocking all the shit that you don't wanna initialize.

1

u/lobax 8d ago

Maybe a English as a third language thing, but most of my unit tests are anything between 3 to a dozen lines long. For me that is a few lines.

Obviously, any reusable scaffolding that one calls before all or before each test not included.