Clean up deterministic tests
This commit is contained in:
parent
7b9287ca52
commit
f36a84b275
1 changed files with 1366 additions and 3835 deletions
|
|
@ -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")
|
||||
);
|
||||
}
|
||||
},
|
||||
],
|
||||
};
|
||||
Loading…
Reference in a new issue