mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-15 20:50:12 +00:00
test: align Fetch recovery diagnostics
This commit is contained in:
1 parent
a43882d743
commit
f6563609e6
2 files changed
+8
-3
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { displayRev } from "@vrtmrz/livesync-commonlib/compat/common/utils";
|
||||
import assert from "node:assert/strict";
|
||||
import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
@@ -165,8 +166,12 @@ test(
|
||||
"--write-settings"
|
||||
);
|
||||
assert.notEqual(omittedChunkFetch.code, 0, "Fetch must fail when local-only chunk reads omit the remote chunk");
|
||||
assert.match(omittedChunkFetch.combined, /useOnlyLocalChunk=true/);
|
||||
assert.match(omittedChunkFetch.combined, /Could not reconcile/);
|
||||
assert.ok(
|
||||
omittedChunkFetch.combined.includes(
|
||||
`Could not reconcile ${notePath}: content for current database revision ${displayRev(originalRevision)} is unavailable;`
|
||||
),
|
||||
omittedChunkFetch.combined
|
||||
);
|
||||
assert.deepEqual(
|
||||
await readFile(receiverNote),
|
||||
expectedBytes,
|
||||
|
||||
Reference in new issue
Block a user