testing

  • 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…

  • A data provider with string keys reads better on failure

    A provider returning a plain list produces failures reported as “with data set #3”, and you count rows to find out which one. The provider runs before setUp,…

  • Block patterns, and the page an editor can build

    Eleven custom blocks that exist to produce one layout. 5.5 added patterns, which is the feature the blocks were being used for — and it needs no build…

  • Closure::bind, and the private property you had to reach

    Asserting on a private property in a test usually means reflection, four lines of it, repeated — and there is a shorter route that is occasionally the right…