Skip to content

Commit 476ef48

Browse files
committed
test: avoid url substring assertion
1 parent 4b9c129 commit 476ef48

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/unit/compression/caveman-engine.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ describe("caveman engine", () => {
9999
preservePatterns: [],
100100
});
101101
const text = result.body.messages[0].content as string;
102-
assert.equal(text.split(/\s+/).includes(url), true, `URL should be preserved`);
102+
assert.equal(
103+
text.split(/\s+/).some((token) => token === url),
104+
true,
105+
`URL should be preserved`
106+
);
103107
});
104108

105109
it("should handle empty messages array", () => {

0 commit comments

Comments
 (0)