....
This commit is contained in:
parent
3dab48f58b
commit
c869f0a880
1 changed files with 461 additions and 578 deletions
|
|
@ -396,13 +396,12 @@ test("scan failures cannot masquerade as deletions", async () => {
|
|||
};
|
||||
await assert.rejects(
|
||||
scanLocalFiles({
|
||||
next: structuredClone(original),
|
||||
database: runtime.database,
|
||||
changes: [],
|
||||
files: runtime.files,
|
||||
guard: () => { },
|
||||
ignored: () => false,
|
||||
oversized: () => false,
|
||||
commit: (next) => runtime.database.commit(next)
|
||||
oversized: () => false
|
||||
}),
|
||||
/permission denied/
|
||||
);
|
||||
|
|
@ -424,13 +423,12 @@ for (const phase of ["before", "durable"]) {
|
|||
const scan = async () => {
|
||||
const runtime = current.restart();
|
||||
await scanLocalFiles({
|
||||
next: structuredClone(runtime.database.state),
|
||||
database: runtime.database,
|
||||
changes,
|
||||
files: runtime.files,
|
||||
guard: () => { },
|
||||
ignored: () => false,
|
||||
oversized: () => false,
|
||||
commit: (next) => runtime.database.commit(next)
|
||||
oversized: () => false
|
||||
});
|
||||
return runtime.database.state;
|
||||
};
|
||||
|
|
@ -458,13 +456,12 @@ async function scanChanges(
|
|||
): Promise<void> {
|
||||
await runtime.database.recoverPersistence();
|
||||
await scanLocalFiles({
|
||||
next: structuredClone(runtime.database.state),
|
||||
database: runtime.database,
|
||||
changes,
|
||||
files: runtime.files,
|
||||
guard: () => { },
|
||||
ignored: () => false,
|
||||
oversized: () => false,
|
||||
commit: (next) => runtime.database.commit(next)
|
||||
oversized: () => false
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -574,13 +571,12 @@ test("normalization-sensitive disk does not lose a distinct decomposed filename"
|
|||
await runtime.database.commit(next);
|
||||
await current.disk.userWrite("e\u0301.md", bytes("decomposed"));
|
||||
await scanLocalFiles({
|
||||
next: structuredClone(runtime.database.state),
|
||||
database: runtime.database,
|
||||
changes: [],
|
||||
files: runtime.files,
|
||||
guard: () => { },
|
||||
ignored: () => false,
|
||||
oversized: () => false,
|
||||
commit: (next) => runtime.database.commit(next)
|
||||
oversized: () => false
|
||||
});
|
||||
assert.equal(
|
||||
Object.keys(runtime.database.state.local).length,
|
||||
|
|
|
|||
Loading…
Reference in a new issue