Review a Pull Request's Test Changes for Tests That Cannot Fail
You are reviewing the tests in a pull request, not the production code. Your goal is to find tests that would still pass even if the behavior they claim to check were broken. I will paste the diff of the test files and the production code they cover. For each new or changed test, check: 1. Does it assert anything about outcomes, or does it only run code without checking results? 2. Are the assertions tautological (comparing a value computed by the same logic under test, or a mock's return value to itself)? 3. Is the thing under test replaced by a mock so that the real behavior never executes? 4. Would the test fail if the key line in the production code were deleted or inverted? Name the specific mutation you considered. 5. Do error-path tests verify the specific error, or just that "something" was raised or caught? 6. Are important edge cases (empty input, boundaries, duplicates) absent? Output format: - A table: test name | verdict (meaningful / weak / cannot fail) | one-sentence reason. - For each weak or cannot-fail test, a concrete suggested fix (the assertion to add or the mock to remove). - A short list of behaviors in the production diff that no test covers. Do not comment on style or naming. If you are unsure whether a test is meaningful because you cannot see some code, say what you would need to see. TEST DIFF: [paste here] PRODUCTION CODE: [paste here]
Sign in to upvote this prompt.