mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten diffs artifact assertions
This commit is contained in:
@@ -68,7 +68,7 @@ describe("diffs tool rendered output guards", () => {
|
||||
});
|
||||
|
||||
expect(screenshotter.screenshotHtml).toHaveBeenCalledTimes(1);
|
||||
expect((result?.details as Record<string, unknown>).filePath).toEqual(expect.any(String));
|
||||
expect((result?.details as Record<string, unknown>).filePath).toMatch(/preview\.png$/);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -190,8 +190,10 @@ describe("diffs tool", () => {
|
||||
});
|
||||
|
||||
expectArtifactOnlyFileResult(screenshotter, result);
|
||||
expect((result?.details as Record<string, unknown>).artifactId).toEqual(expect.any(String));
|
||||
expect((result?.details as Record<string, unknown>).expiresAt).toEqual(expect.any(String));
|
||||
expect(requireString(readDetails(result).artifactId, "artifactId")).toMatch(/^[a-f0-9]{20}$/u);
|
||||
expect(requireString(readDetails(result).expiresAt, "expiresAt")).toMatch(
|
||||
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u,
|
||||
);
|
||||
});
|
||||
|
||||
it("honors ttlSeconds for artifact-only file output", async () => {
|
||||
|
||||
Reference in New Issue
Block a user