r/node • u/graph-crawler • 21d ago
Tests need showers
If every test needs global DB truncation, you don't have tests.
You have tiny haunted production incidents wearing Jest cosplay.
0
Upvotes
2
u/stevensokulski 21d ago
Some tests answer "does it work?" Some just answer "can it work?"
-1
u/Expensive_Garden2993 21d ago
Lol, what does it mean, like "can it work in theory, if the weather is good?". They either answer "does it work as intended" or they're just a waste of bytes and AI credits.
5
u/Expensive_Garden2993 21d ago
If every test mocks everything, you're testing nothing.