Skip to content

🗓️ 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

  1. Three distinct sections separated by blank lines:
    • Arrange: Prepare the task and set expectations
    • Act: Execute the operation
    • Assert: Verify expectations were met
  2. Resource cleanup: Free resources immediately after use

  3. Clear naming: Use expected_* and actual_* 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.