Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
No, you don't - you need to remove them if they're useless.
Treat your test code like your main code. It should be well written, free of duplication and performing to spec. If it's not, you need stories in place to reduce that technical debt. -
@AlmondSauce amen Boi preach it π§π€π§π€π§π€
Test code is still code (it's the second word in this sentence!)
If you don't treat her right, she ain't gonna treat you right either -
Useless as in trivial? Don't write tests for trivial code (eg. getter/setters and DTOs).
-
These tests aren't useless. They tick a box on a checklist deemed very important by some manager.
But you could make some of them actually do some serious testing to make maintaining the actual product easier. -
b2plane63951yI'd like to see how you write unit tests in nextjs "the backend + frontend framework" ππππππππππππππππππππππππππππΉπΉπΉπΉπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπ©π©π©π©π©π©π©π©π©π©π©
I have 2695 unit tests in current project.
Most of them are useless but you still need to maitain them....
rant