style: apply Biome formatting to the catalog release test
Gitea Actions Runner Test / test-job (push) Successful in 1s
CI / check (push) Successful in 32s
CI / tests-integration (push) Successful in 1m49s
CI / tests-unit (push) Successful in 1m50s
CI / tests-ui (push) Successful in 2m33s
CI / preflight (push) Skipped
CI / deploy (push) Failing after 20s

The timeout constant made the first it() line exceed the line width, so
`biome check .` failed with a format error. Reformat and confirm the
three publication tests still pass.
This commit is contained in:
openhands committed 2026-09-27 19:26:08 +02:00
1 parent c2981bd970
commit d2d01141f1
1 file changed
+50 -38
+50 -38
View File
@@ -64,42 +64,54 @@ async function fixture() {
const GIT_PUBLICATION_TIMEOUT = 120_000; const GIT_PUBLICATION_TIMEOUT = 120_000;
describe("catalog release Git publication", () => { describe("catalog release Git publication", () => {
it("publishes exact files and does not create another commit for identical data", async () => { it(
const { options, git } = await fixture(); "publishes exact files and does not create another commit for identical data",
const first = await publishCatalogFiles(options); async () => {
expect(await publishCatalogFiles(options)).toBe(first); const { options, git } = await fixture();
expect(git("rev-list", "--count", "HEAD")).toBe("2"); const first = await publishCatalogFiles(options);
expect( expect(await publishCatalogFiles(options)).toBe(first);
await readFile( expect(git("rev-list", "--count", "HEAD")).toBe("2");
path.join(options.checkout, "Gamedata/icons/chair.png"), expect(
"utf8", await readFile(
), path.join(options.checkout, "Gamedata/icons/chair.png"),
).toBe("asset\r\n"); "utf8",
}, GIT_PUBLICATION_TIMEOUT); ),
it("rejects a snapshot changed after manifest creation and restores a clean checkout", async () => { ).toBe("asset\r\n");
const { options, source, git } = await fixture(); },
const head = git("rev-parse", "HEAD"); GIT_PUBLICATION_TIMEOUT,
await writeFile(source, "tampered"); );
await expect(publishCatalogFiles(options)).rejects.toThrow( it(
"bytes mismatch", "rejects a snapshot changed after manifest creation and restores a clean checkout",
); async () => {
expect(git("rev-parse", "HEAD")).toBe(head); const { options, source, git } = await fixture();
expect(git("status", "--porcelain")).toBe(""); const head = git("rev-parse", "HEAD");
}, GIT_PUBLICATION_TIMEOUT); await writeFile(source, "tampered");
it("rejects Git newline normalization before creating a commit", async () => { await expect(publishCatalogFiles(options)).rejects.toThrow(
const { options, git } = await fixture(); "bytes mismatch",
await writeFile( );
path.join(options.checkout, ".gitattributes"), expect(git("rev-parse", "HEAD")).toBe(head);
"Gamedata/** text eol=lf\n", expect(git("status", "--porcelain")).toBe("");
); },
git("add", ".gitattributes"); GIT_PUBLICATION_TIMEOUT,
git("commit", "-m", "Normalize newlines"); );
git("push"); it(
const head = git("rev-parse", "HEAD"); "rejects Git newline normalization before creating a commit",
await expect(publishCatalogFiles(options)).rejects.toThrow( async () => {
"Staged catalog bytes mismatch", const { options, git } = await fixture();
); await writeFile(
expect(git("rev-parse", "HEAD")).toBe(head); path.join(options.checkout, ".gitattributes"),
expect(git("status", "--porcelain")).toBe(""); "Gamedata/** text eol=lf\n",
}, GIT_PUBLICATION_TIMEOUT); );
git("add", ".gitattributes");
git("commit", "-m", "Normalize newlines");
git("push");
const head = git("rev-parse", "HEAD");
await expect(publishCatalogFiles(options)).rejects.toThrow(
"Staged catalog bytes mismatch",
);
expect(git("rev-parse", "HEAD")).toBe(head);
expect(git("status", "--porcelain")).toBe("");
},
GIT_PUBLICATION_TIMEOUT,
);
}); });