test(extensions): stabilize ci test assertions

This commit is contained in:
Peter Steinberger
2026-04-20 18:08:17 +01:00
parent 84065b9a68
commit 4edc64037c
2 changed files with 18 additions and 3 deletions

View File

@@ -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", () => {