Release Package Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 11:29:24 +02:00
parent e42943e689
commit 01c7a8c372
32 changed files with 1316 additions and 85 deletions
+17 -1
View File
@@ -45,7 +45,23 @@ describe("inventory comparison", () => {
changed: "changed",
left: "only-left",
right: "only-right",
same: "same",
same: "unverified",
});
});
it("only calls file contents equal after matching SHA-256 evidence", () => {
const left = document([entry("same-size", 4, "declared")]);
const right = document([entry("same-size", 4, "declared")]);
expect(compareInventories(left, right)[0]?.status).toBe("unverified");
expect(
compareInventories(left, right, {
"same-size": { leftSha256: "abc", rightSha256: "abc" },
})[0]?.status,
).toBe("same");
expect(
compareInventories(left, right, {
"same-size": { leftSha256: "abc", rightSha256: "def" },
})[0]?.status,
).toBe("changed");
});
});