test: avoid url substring assertion

This commit is contained in:
diegosouzapw
2026-05-02 05:01:44 -03:00
parent 4b9c129e1c
commit 476ef48fa5

View File

@@ -99,7 +99,11 @@ describe("caveman engine", () => {
preservePatterns: [],
});
const text = result.body.messages[0].content as string;
assert.equal(text.split(/\s+/).includes(url), true, `URL should be preserved`);
assert.equal(
text.split(/\s+/).some((token) => token === url),
true,
`URL should be preserved`
);
});
it("should handle empty messages array", () => {