testing

  • The migration that squashed two hundred files

    A test suite spending ninety seconds replaying six years of schema history. Squashing is a good idea with two failure modes worth knowing first.

  • Composer 2 is not a minor upgrade

    A dependency resolver rewritten and parallel downloads, so install went from ninety seconds to eleven. And a plugin API that broke three packages.

  • A golden master, for the report nobody can specify

    A legacy report with no specification and forty branches cannot be unit tested, and it can be pinned: record what it produces today and fail when that changes.…

  • webpack 5, and the polyfills that stopped being automatic

    The build broke on a package importing crypto. webpack 4 quietly bundled a browser shim; 5 does not, and the error is the correct one.

  • An integration test needs the real database

    A repository test against a mocked connection asserts that the code calls the methods you expected, which is a restatement of the code rather than a check on…

  • Testing through the DOM rather than the component instance

    A test that reaches into component state asserts on the implementation, and every refactor that changed nothing observable breaks it. Querying by role rather than by test id…

  • Laravel 8 moved the models and rewrote the factories

    A directory move, a factory rewrite and a route resolution change that breaks silently. Which of the three actually needs doing, and in what order.

  • A test that asserts on peak memory

    An N+1 fixed by eager loading can be replaced by a memory problem, and a query-count assertion reports the page as healthy while it hydrates forty thousand objects.…

  • Mutation testing finds the assertion you did not write

    Ninety-four percent coverage and a suite that passes with the comparison inverted, because coverage measures execution rather than verification. The three numbers say different things: MSI is over…

  • Vue 3 and the Composition API

    A 600-line component with a mixin nobody could trace. The Composition API is not a new way to write components — it is a way to move logic…