mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-26 21:37:05 +00:00
Align host integrations with current API recommendations
This commit is contained in:
@@ -18,10 +18,13 @@ vi.mock("@vrtmrz/livesync-commonlib/compat/common/utils", async (importOriginal)
|
||||
});
|
||||
vi.mock("@/features/LiveSyncCommands", () => ({
|
||||
LiveSyncCommands: class LiveSyncCommands {
|
||||
core!: { settings: unknown };
|
||||
core!: { settings: unknown; services: unknown };
|
||||
get settings() {
|
||||
return this.core.settings;
|
||||
}
|
||||
get services() {
|
||||
return this.core.services;
|
||||
}
|
||||
},
|
||||
}));
|
||||
vi.mock("@/common/events", () => ({
|
||||
@@ -76,11 +79,13 @@ describe("LocalDatabaseMaintenance prerequisites", () => {
|
||||
};
|
||||
const maintenance = Object.create(LocalDatabaseMaintenance.prototype) as LocalDatabaseMaintenance;
|
||||
Object.assign(maintenance, {
|
||||
plugin: {
|
||||
addCommand: vi.fn((command) => commands.push(command)),
|
||||
},
|
||||
core: {
|
||||
settings,
|
||||
services: {
|
||||
API: {
|
||||
addCommand: vi.fn((command) => commands.push(command)),
|
||||
},
|
||||
},
|
||||
},
|
||||
_isDatabaseReady: vi.fn(() => true),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user