mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:10:52 +00:00
test(extensions): stabilize ci test assertions
This commit is contained in:
@@ -36,7 +36,10 @@ async function expectDirectoryIds(
|
||||
) {
|
||||
const entries = await listDirectoryEntriesWithDefaults(listFn, cfg);
|
||||
const ids = entries.map((entry) => entry.id);
|
||||
expect(options?.sorted ? ids.toSorted((a, b) => a.localeCompare(b)) : ids).toEqual(expected);
|
||||
const sortIds = (values: string[]) => values.toSorted((a, b) => a.localeCompare(b));
|
||||
expect(options?.sorted ? sortIds(ids) : ids).toEqual(
|
||||
options?.sorted ? sortIds(expected) : expected,
|
||||
);
|
||||
}
|
||||
|
||||
describe("Telegram directory contract", () => {
|
||||
|
||||
Reference in New Issue
Block a user