Format & lint
This commit is contained in:
parent
fefac224b0
commit
7f62273e72
1 changed files with 2149 additions and 1258 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import type { AssertableState } from "../utils/assertable-state";
|
||||
import type { TestDefinition } from "../test-definition";
|
||||
|
||||
export const multiFileOperationsTest: TestDefinition = {
|
||||
|
|
@ -19,7 +20,12 @@ export const multiFileOperationsTest: TestDefinition = {
|
|||
{ type: "delete", client: 0, path: "A.md" },
|
||||
{ type: "sync", client: 0 },
|
||||
|
||||
{ type: "update", client: 1, path: "B.md", content: "updated by client 1" },
|
||||
{
|
||||
type: "update",
|
||||
client: 1,
|
||||
path: "B.md",
|
||||
content: "updated by client 1"
|
||||
},
|
||||
{ type: "rename", client: 1, oldPath: "A.md", newPath: "D.md" },
|
||||
|
||||
{ type: "enable-sync", client: 1 },
|
||||
|
|
@ -28,11 +34,13 @@ export const multiFileOperationsTest: TestDefinition = {
|
|||
|
||||
{
|
||||
type: "assert-consistent",
|
||||
verify: (s) => {
|
||||
verify: (s: AssertableState): void => {
|
||||
s.assertContains("B.md", "updated")
|
||||
.assertFileExists("C.md")
|
||||
.assertFileNotExists("A.md");
|
||||
s.ifFileExists("D.md", (s) => s.assertContent("D.md", "content-a"));
|
||||
s.ifFileExists("D.md", (inner) =>
|
||||
inner.assertContent("D.md", "content-a")
|
||||
);
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue