mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-20 05:07:34 +00:00
test: avoid string spread in image tempdir assertion
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user