logoalt Hacker News

theowaway213456today at 1:25 PM1 replyview on HN

Every time you write a test that handles some data, you write an assertion about how much data is handled?

Come on, this is such an easy thing to forget to test. Don't act like there is some magical testing strategy that would have caught this


Replies

altcognitotoday at 1:43 PM

I'll acknowledge that this is probably not likely to get caught.

Integration testing could/should catch this, especially for a client side app.

A simple constraints is a good thing. "Our app shouldn't use more than 50mb of ram, or use 3gb of disk space."

show 1 reply