5da9525afd
Generate a sha256sum-compatible checksums file covering every release binary and the browser-relay zip, and upload it as a release asset so downloads can be verified offline without hitting the GitHub API.
17 lines
591 B
TypeScript
17 lines
591 B
TypeScript
import { describe, expect, it } from "bun:test";
|
|
import { formatChecksums } from "./ci-release-checksums";
|
|
|
|
describe("formatChecksums", () => {
|
|
it("sorts entries by basename and formats as `sha256sum -c`-compatible lines", () => {
|
|
const output = formatChecksums([
|
|
{ name: "omp-linux-x64", sha256: "b".repeat(64) },
|
|
{ name: "omp-darwin-arm64", sha256: "a".repeat(64) },
|
|
]);
|
|
expect(output).toBe(`${"a".repeat(64)} omp-darwin-arm64\n${"b".repeat(64)} omp-linux-x64\n`);
|
|
});
|
|
|
|
it("returns an empty string for no entries", () => {
|
|
expect(formatChecksums([])).toBe("");
|
|
});
|
|
});
|