testing

  • Jest snapshot tests age badly unless you read the diff

    A snapshot that fails is regenerated with -u, and after the third time that becomes reflex — at which point the test asserts that the output equals whatever…

  • Testing a queue worker without running a queue

    Testing that a controller queued a job by starting a worker and waiting is slow and flaky, and testing it by asserting on the queue table couples the…

  • webpack 4 needs almost no configuration

    One line replaced about eighty. The defaults are almost always right, and the cost is that they are invisible when they are not.

  • Laravel 5.6 and logging you can configure

    Logging moved into a config file, and stacks are why it matters — a different format per destination, decided without touching a service provider.

  • Coverage on a legacy codebase is a direction, not a number

    Setting a minimum coverage threshold on a codebase at eleven percent produces either a permanently red build or a threshold set to eleven percent, and neither changes anything.…

  • Symfony 4 and the bundle that does not exist

    A new project used to arrive with forty megabytes of vendor code and one route. The framework got smaller, and the interesting part is what happens at install…

  • The dump-server keeps var_dump out of the response

    Dumping from inside a JSON endpoint, a queue worker or a middleware corrupts the output you were trying to inspect, so the debugging tool destroys the thing being…

  • Bootstrap 4 dropped the float grid

    Two and a half years in alpha, and the grid is flexbox now. The class renames are mechanical; the ones that changed meaning rather than name are not.

  • Mutation testing tells you what coverage does not

    Line coverage says a line executed during the suite. It does not say an assertion would have failed had that line been wrong, which is the question everyone…

  • Argument count errors are their own exception

    Calling a userland function with too few arguments used to be a warning that let execution continue with the parameter unset, which turned a call-site mistake into a…