From d2d01141f1d50d584e831fbb6ffe108eb996849d Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 27 Sep 2026 19:26:08 +0200 Subject: [PATCH] style: apply Biome formatting to the catalog release test 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. --- src/lib/services/catalog-git-release.test.ts | 88 +++++++++++--------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/src/lib/services/catalog-git-release.test.ts b/src/lib/services/catalog-git-release.test.ts index a651b917..f957490e 100644 --- a/src/lib/services/catalog-git-release.test.ts +++ b/src/lib/services/catalog-git-release.test.ts @@ -64,42 +64,54 @@ async function fixture() { const GIT_PUBLICATION_TIMEOUT = 120_000; describe("catalog release Git publication", () => { - it("publishes exact files and does not create another commit for identical data", async () => { - const { options, git } = await fixture(); - const first = await publishCatalogFiles(options); - expect(await publishCatalogFiles(options)).toBe(first); - expect(git("rev-list", "--count", "HEAD")).toBe("2"); - expect( - await readFile( - path.join(options.checkout, "Gamedata/icons/chair.png"), - "utf8", - ), - ).toBe("asset\r\n"); - }, GIT_PUBLICATION_TIMEOUT); - it("rejects a snapshot changed after manifest creation and restores a clean checkout", async () => { - const { options, source, git } = await fixture(); - const head = git("rev-parse", "HEAD"); - await writeFile(source, "tampered"); - await expect(publishCatalogFiles(options)).rejects.toThrow( - "bytes mismatch", - ); - expect(git("rev-parse", "HEAD")).toBe(head); - expect(git("status", "--porcelain")).toBe(""); - }, GIT_PUBLICATION_TIMEOUT); - it("rejects Git newline normalization before creating a commit", async () => { - const { options, git } = await fixture(); - await writeFile( - path.join(options.checkout, ".gitattributes"), - "Gamedata/** text eol=lf\n", - ); - 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); + it( + "publishes exact files and does not create another commit for identical data", + async () => { + const { options, git } = await fixture(); + const first = await publishCatalogFiles(options); + expect(await publishCatalogFiles(options)).toBe(first); + expect(git("rev-list", "--count", "HEAD")).toBe("2"); + expect( + await readFile( + path.join(options.checkout, "Gamedata/icons/chair.png"), + "utf8", + ), + ).toBe("asset\r\n"); + }, + GIT_PUBLICATION_TIMEOUT, + ); + it( + "rejects a snapshot changed after manifest creation and restores a clean checkout", + async () => { + const { options, source, git } = await fixture(); + const head = git("rev-parse", "HEAD"); + await writeFile(source, "tampered"); + await expect(publishCatalogFiles(options)).rejects.toThrow( + "bytes mismatch", + ); + expect(git("rev-parse", "HEAD")).toBe(head); + expect(git("status", "--porcelain")).toBe(""); + }, + GIT_PUBLICATION_TIMEOUT, + ); + it( + "rejects Git newline normalization before creating a commit", + async () => { + const { options, git } = await fixture(); + await writeFile( + path.join(options.checkout, ".gitattributes"), + "Gamedata/** text eol=lf\n", + ); + 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, + ); });