Start fixing tests

This commit is contained in:
Andras Schmelczer 2026-01-24 11:00:55 +00:00
parent 727b6b7ed5
commit 7fcd0f0bfa
19 changed files with 210 additions and 218 deletions

View file

@ -101,7 +101,7 @@ export class Database {
i === 0
? false
: records[i - 1].parallelVersion ===
current.parallelVersion
current.parallelVersion
)
) {
throw new Error(
@ -130,11 +130,7 @@ export class Database {
target.metadata,
null,
2
)} to ${JSON.stringify(
metadata,
null,
2
)}`
)} to ${JSON.stringify(metadata, null, 2)}`
);
target.metadata = metadata;
@ -142,7 +138,6 @@ export class Database {
this.saveInTheBackground();
}
public getLatestDocumentByRelativePath(
find: RelativePath
): DocumentRecord | undefined {
@ -153,9 +148,8 @@ export class Database {
return candidates[0];
}
public createNewPendingDocument(
relativePath: RelativePath,
relativePath: RelativePath
): DocumentRecord {
this.logger.debug(`Creating new pending document: ${relativePath}`);
const previousEntry =
@ -223,7 +217,6 @@ export class Database {
candidate.isDeleted = true;
}
public removeDocument(find: DocumentRecord): void {
removeFromArray(this.documents, find);
this.saveInTheBackground();
@ -294,7 +287,7 @@ export class Database {
if (duplicates.length > 0) {
throw new Error(
"Document IDs are not unique, found duplicates: " +
duplicates.join("; ")
duplicates.join("; ")
);
}
}