Test mindset — tiny assertions, AAA, red→green→refactor
Build the habit of writing tiny tests: understand assertions, Arrange–Act–Assert, and the red→green→refactor loop.
Why test mindset?
Goal: Think in tiny, reliable tests.
- Small assert to check results
- AAA: Arrange → Act → Assert
- Red → Green → Refactor loop
- Name tests by behavior

A tiny assertion
A tiny assertEqual prints pass/fail. This mirrors what real test frameworks do.
// Minimal assertEqual for quick checks
function assertEqual(actual, expected, name) {
if (actual === expected) {
console.log("✅", name);
} else {
console.log("❌", name, "expected:", expected, "got:", actual);
}
}
// Demo check
assertEqual(2 + 3, 5, "adds numbers");

All lessons in this course
- Test mindset — tiny assertions, AAA, red→green→refactor
- Linting with ESLint; Prettier formatting
- CI basics — run lint/test on every push