Commit LLM generated test cases

This commit is contained in:
Andras Schmelczer 2026-03-25 21:38:31 +00:00
parent 0ce82353e0
commit 302f1fa3c4
110 changed files with 7761 additions and 0 deletions

View file

@ -0,0 +1,43 @@
import type { TestDefinition } from "../test-definition";
export const deleteRecreateSamePathTest: TestDefinition = {
name: "Delete Then Recreate at Same Path",
description:
"Client 0 creates A.md, syncs. Then deletes A.md and creates a new A.md " +
"with different content. Both clients should converge on the new content.",
clients: 2,
steps: [
// Setup: create and sync A.md
{ type: "create", client: 0, path: "A.md", content: "version 1" },
{ type: "enable-sync", client: 0 },
{ type: "enable-sync", client: 1 },
{ type: "sync" },
{ type: "barrier" },
{ type: "assert-content", client: 1, path: "A.md", content: "version 1" },
// Client 0 deletes then recreates A.md with new content
{ type: "disable-sync", client: 0 },
{ type: "delete", client: 0, path: "A.md" },
{ type: "create", client: 0, path: "A.md", content: "version 2" },
{ type: "enable-sync", client: 0 },
{ type: "sync" },
{ type: "barrier" },
// Both clients should have the new content
{ type: "assert-exists", client: 0, path: "A.md" },
{ type: "assert-exists", client: 1, path: "A.md" },
{
type: "assert-content",
client: 0,
path: "A.md",
content: "version 2"
},
{
type: "assert-content",
client: 1,
path: "A.md",
content: "version 2"
},
{ type: "assert-consistent" }
]
};