🗓️ Week 16
The 3A Testing Convention
This week, I established a testing convention for execution spec tests based on the 3A pattern: Arrange, Act, Assert.
The Rules
-
Three distinct sections separated by blank lines:
- Arrange: Prepare the task and set expectations
- Act: Execute the operation
- Assert: Verify expectations were met
-
Resource cleanup: Free resources immediately after use
-
Clear naming: Use
expected_*andactual_*prefixes for assertions
This convention improves test readability and makes the test's intent immediately clear. I also updated the project's internal notes to formalize this standard for future contributions.