Adhere to these principles when writing tests:
-
Use arrange-act-assert:
- Arrange: set up the requisite state and inputs.
- Act: run the code that triggers the behavior under test.
- Assert: assert the expected outcomes.
-
Keep each test focused and orthogonal to other tests unless you're testing an interaction between two behaviors or each test is expensive.
-
Prefer parameterized testing over multiple independent calls and assertions in the same test.
-
Test behaviors, not fu
[Description truncada. Veja o README completo no GitHub.]