Clean up deterministic tests

This commit is contained in:
Andras Schmelczer 2026-03-28 11:12:43 +00:00
commit f36a84b275

View file

@ -0,0 +1,27 @@
import type { TestDefinition } from "../test-definition";
export const onlineEditVsDeleteConvergenceTest: TestDefinition = {
description:
"Both clients are online. Client 0 edits a file while client 1 " +
"deletes it. The clients must converge to the same state.",
clients: 2,
steps: [
{ type: "create", client: 0, path: "A.md", content: "original" },
{ type: "enable-sync", client: 0 },
{ type: "enable-sync", client: 1 },
{ type: "barrier" },
{ type: "update", client: 0, path: "A.md", content: "edited by client 0" },
{ type: "delete", client: 1, path: "A.md" },
{ type: "barrier" },
{
type: "assert-consistent",
verify: (state) => {
state.ifFileExists("A.md", (s) =>
s.assertContainsAny("A.md", "edited by client 0")
);
}
},
],
};