Remix.run Logo
▲ bcvvvy 2 hours ago

Test cases doesn't mean shit works. It means test cases pass.

About 50% of the test cases I've ever seen are pointless.

▲teeray an hour ago | parent | next [-]

IME, nobody reads the tests in code review either. They just see "looks like it has tests" *check*. Many times, I've caught LLMs writing completely vacuous tests for configurations of components that were impossible. But coverage number go up, so those tests get written.

▲mysterydip an hour ago | parent | prev | next [-]

I was reviewing some coordinate conversion code one time and a developer’s method of creating unit tests was to run their code, generate a result, then make that output the correct result for the test. Except the result was wrong based on other utilities doing the same conversion, and also failed edge cases.

▲thargor90 17 minutes ago | parent [-]

For the inexperienced dev audience: generally speaking that is a valid way to generate regression tests and document novel edge case behavior.

In your case of course any existing utilities behavior/specs should be tested first, regression tests just on top, if they are not already covered.

▲bluGill an hour ago | parent | prev [-]

Test cases are an indicator. They say that this situation I thought of works as I think it should. It doesn't cover everything, but it does cover a large number of things.

A test is mostly useful only in the case that by failing it alerts you to a bug.