.
This commit is contained in:
parent
25f64ec690
commit
ff1f474324
1 changed files with 3271 additions and 2003 deletions
|
|
@ -4,7 +4,7 @@ import * as fs from "node:fs/promises";
|
|||
import * as path from "node:path";
|
||||
import { tmpdir } from "node:os";
|
||||
import { NodeFileSystemOperations } from "../local-client-cli/src/node-filesystem";
|
||||
import { Database, emptyState } from "../sync-client/src/persistence/database";
|
||||
import { Database, createEmptyDatabase } from "../sync-client/src/persistence/database";
|
||||
import { FileOperations } from "../sync-client/src/file-operations/file-operations";
|
||||
import type { ServerConfig } from "../sync-client/src/services/server-config";
|
||||
import { hashSnapshot } from "../sync-client/src/snapshot";
|
||||
|
|
@ -97,7 +97,7 @@ test(
|
|||
"original bytes"
|
||||
);
|
||||
}
|
||||
const initial = emptyState("real");
|
||||
const initial = createEmptyDatabase("real");
|
||||
initial.local = { a: "a.md", b: "b.md" };
|
||||
for (const [id, relative] of Object.entries(initial.local))
|
||||
initial.documents[id] = {
|
||||
|
|
@ -119,7 +119,7 @@ test(
|
|||
} as ServerConfig);
|
||||
const next = structuredClone(initial);
|
||||
next.local = { a: "b.md", b: "a.md" };
|
||||
await operations.apply(next);
|
||||
await operations.applyChanges(next);
|
||||
assert.equal(
|
||||
Buffer.from(
|
||||
(await disk.read("a.md"))!.content
|
||||
|
|
|
|||
Loading…
Reference in a new issue