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.
This commit is contained in:
@@ -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`);
|
`git -c user.email=lab -c user.name=lab commit -qm built`);
|
||||||
await mesh("build /root/built --wait 300s", 420_000);
|
await mesh("build /root/built --wait 300s", 420_000);
|
||||||
|
|
||||||
assert.match(await mesh("builds"), /built/,
|
// Naming the module, and not merely containing its name: `builds` says "nothing has been built
|
||||||
"the build was accepted and no build was recorded against the module");
|
// 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);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user