test(environment): reuse numbered UUID fixtures (#16948)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-12-05 13:02:21 +08:00
1 parent 6038cea422
commit 313bb76bcd
2 files changed
+2 -6

No files matched your search

@@ -1,8 +1,6 @@
import { describe, expect, it } from "vitest";
import { servedFrom } from "../../../tests/fixtures/environmentStateServing.js";
const uuid = (n: number): string =>
`00000000-0000-4000-8000-${String(n).padStart(12, "0")}`;
import { numberedUuid as uuid } from "../../../tests/fixtures/environmentStateWrites.js";
/** Two held books and a create whose `mixed` joins the generated id and the sent slug; the held books put `heldPrefix` before theirs. */
const slugBooks = (heldPrefix = "") => {
@@ -8,6 +8,7 @@ import {
BOTH_BOOKS_RENAMED_ROWS,
FIRST_BOOK,
SECOND_BOOK,
numberedUuid as uuid,
renamedBook,
type Book,
} from "../../../tests/fixtures/environmentStateWrites.js";
@@ -377,9 +378,6 @@ describe("served bulk writes whose recordings answered every entity", () => {
});
});
const uuid = (n: number): string =>
`00000000-0000-4000-8000-${String(n).padStart(12, "0")}`;
/** A book holding child rows, which an update gives fresh ids. */
const withRows = (id: number, name: string, row: number) => ({
id,