
Testing
Arrange, Act, Assert
Arrange, Act, Assert splits a test into setup, one action and checks. See it in Vitest with builders, async tests, common mistakes and variants.
7 min read
Tag
4 posts

Arrange, Act, Assert splits a test into setup, one action and checks. See it in Vitest with builders, async tests, common mistakes and variants.

Compare unit, integration and end-to-end tests with one JavaScript feature tested at each level: scope, speed, dependencies and what each catches.

What makes a good test: it fails for the right reason, reads like a spec, runs fast, stays independent and survives refactoring, with before and after examples.

Learn the five test doubles in JavaScript: dummies, stubs, spies, mocks and fakes, with Vitest examples, when to use each and the cost of over-mocking.