mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-25 12:57:07 +00:00
fix: close finite remote database connections
This commit is contained in:
@@ -222,6 +222,7 @@ describe("LocalDatabaseMaintenance Garbage Collection V3", () => {
|
||||
const remoteDatabase = {
|
||||
compact: vi.fn(async () => ({ ok: true })),
|
||||
info: vi.fn(async () => ({ compact_running: true })),
|
||||
close: vi.fn(async () => undefined),
|
||||
};
|
||||
Object.assign(maintenance, {
|
||||
core: {
|
||||
@@ -243,6 +244,7 @@ describe("LocalDatabaseMaintenance Garbage Collection V3", () => {
|
||||
"Compaction on remote database completed successfully.",
|
||||
"gc-compact"
|
||||
);
|
||||
expect(remoteDatabase.close).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it.each([
|
||||
|
||||
Reference in New Issue
Block a user