From 44f088a5b69f07145ab01c467b79cbdcd594036b Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 31 Aug 2026 00:46:09 +0200 Subject: [PATCH] Assert the build was recorded, not that the word appears `builds` says "nothing has been built yet" when there is nothing, and the assertion was matching on a word that sentence contains. --- test/integration/mesh.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/integration/mesh.test.ts b/test/integration/mesh.test.ts index dc88160..a3c3705 100644 --- a/test/integration/mesh.test.ts +++ b/test/integration/mesh.test.ts @@ -681,6 +681,10 @@ test("the builder is a module the mesh assigns, with a credential the mesh deliv `git -c user.email=lab -c user.name=lab commit -qm built`); await mesh("build /root/built --wait 300s", 420_000); - assert.match(await mesh("builds"), /built/, - "the build was accepted and no build was recorded against the module"); + // Naming the module, and not merely containing its name: `builds` says "nothing has been built + // yet" when there is nothing, and that sentence contains the word this was matching on. + const recorded = await mesh("builds built"); + assert.doesNotMatch(recorded, /nothing has been built/, + `the build was accepted and no build was recorded against the module:\n${recorded}`); + assert.match(recorded, /built/, recorded); });