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;
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,
);
});