mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
test: avoid url substring assertion
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user