test: avoid string spread in image tempdir assertion

This commit is contained in:
Peter Steinberger
2026-05-11 03:17:49 +01:00
parent f7a07d300a
commit d94ab3db39

View File

@@ -34,7 +34,7 @@ describe("image-ops temp dir", () => {
expect(prefix?.endsWith("-")).toBe(true);
const uuid = prefix?.slice(uuidPrefix.length, -1) ?? "";
expect(uuid).toHaveLength(36);
expect([...uuid].every((char) => /[0-9a-f-]/u.test(char))).toBe(true);
expect(Array.from(uuid).every((char) => /[0-9a-f-]/u.test(char))).toBe(true);
expect([8, 13, 18, 23].map((index) => uuid[index])).toEqual(["-", "-", "-", "-"]);
expect(path.dirname(prefix ?? "")).toBe(secureRoot);
expect(createdTempDir.startsWith(prefix ?? "")).toBe(true);