// Runs in every test worker: a test that fails because the device policy found no // reading in its fixture HOME says which helper it forgot (helpers/disk-reading.ts). import { beforeEach, onTestFailed } from "vitest"; import { forgottenReadingHint } from "./helpers/disk-reading"; beforeEach(() => { onTestFailed(({ task }) => { for (const error of task.result?.errors ?? []) { const hinted = forgottenReadingHint(error.message ?? ""); if (hinted) error.message = hinted; } }); });