Test the real production implementation
PublicTests must exercise code from lib; never reproduce the implementation or mock the production class under test.
Test the real production implementation
Tests must exercise code from lib; never reproduce the implementation or mock the production class under test.
If production behavior is wrong, fix it first and then test that implementation. If it is difficult to test, introduce an appropriate dependency boundary in production instead of a local reference implementation in the test. Use fakes at I/O and platform boundaries and assert meaningful public behavior, including the regression or relevant edge case. Test data, expected results and fake boundary implementations are allowed; copying the algorithm under test is not. This reminder triggers when a test declaration is written because detecting semantic duplication reliably needs review. It does not assert that a test without a direct package import is invalid: a robot may already invoke the real app.
Detection scope
This is a contextual review reminder, not proof of a violation. Explicit user instructions and applicable repository conventions take precedence.