mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 07:10:42 +00:00
test: avoid filter allocation assertions
This commit is contained in:
@@ -8,11 +8,11 @@ import {
|
||||
} from "../../scripts/lib/bundled-plugin-build-entries.mjs";
|
||||
|
||||
function expectNoPrefixMatches(values: string[], prefix: string) {
|
||||
expect(values.filter((value) => value.startsWith(prefix))).toEqual([]);
|
||||
expect(values.some((value) => value.startsWith(prefix))).toBe(false);
|
||||
}
|
||||
|
||||
function expectSomePrefixMatch(values: string[], prefix: string) {
|
||||
expect(values.filter((value) => value.startsWith(prefix)).length).toBeGreaterThan(0);
|
||||
expect(values.some((value) => value.startsWith(prefix))).toBe(true);
|
||||
}
|
||||
|
||||
describe("bundled plugin build entries", () => {
|
||||
|
||||
Reference in New Issue
Block a user