mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
test(reference-source): avoid filesystem enumeration order assumptions
Assert exact inventory contents and cardinality without depending on directory enumeration order. Validation: all nine reader boundary tests pass. Based on #3117. Co-authored-by: Yog D <yogd7657@gmail.com>
This commit is contained in:
@@ -176,10 +176,13 @@ describe("readReferenceSource failures and exclusions", () => {
|
||||
});
|
||||
|
||||
if (!result.ok) throw result.error;
|
||||
expect(checked).toEqual([
|
||||
["ignored", "directory"],
|
||||
["kept", "file"],
|
||||
]);
|
||||
expect(checked).toHaveLength(2);
|
||||
expect(checked).toEqual(
|
||||
expect.arrayContaining([
|
||||
["ignored", "directory"],
|
||||
["kept", "file"],
|
||||
]),
|
||||
);
|
||||
expect(result.value.entries.map(({ path }) => path)).toEqual(["kept"]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user