Skip to content
jshacks.dev

Tag

testing

5 posts

Flat illustration of a test report with one failing test, with the Vitest, GitHub Actions and Jest logos.
Testing

The Testing Pyramid and the Testing Trophy

Compare the testing pyramid and the testing trophy for JavaScript apps: what each says about unit, integration and end-to-end tests, and how to choose.

8 min read
Flat illustration of a test run shown as a row of passing dots, with the Vitest, Mocha, Cypress and Jest logos.
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
Flat illustration of a test report with one failing test, with the Vitest, Cypress, Jest and GitHub Actions logos.
Testing

Unit vs Integration vs End-to-End Tests

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

7 min read
Flat illustration of a test run shown as a row of passing dots, with the Vitest, Cypress, Jest and Mocha logos.
Testing

What Makes a Good Test?

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.

8 min read