mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-15 04:30:12 +00:00
Replace ConfigSync queue and discard stale catalogue scans
This commit is contained in:
1 parent
12d3b661fa
commit
de8c2148d1
9 files changed
+983
-59
No files matched your search
@@ -91,7 +91,7 @@ describe("ConfigSync commands", () => {
|
||||
expect(showPluginSyncModal).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it("cancels the pending configuration Notice before releasing its owned UI", () => {
|
||||
it("cancels the pending configuration Notice before releasing its owned UI", async () => {
|
||||
const notices = { hide: vi.fn() };
|
||||
const periodicPluginSweepProcessor = { disable: vi.fn() };
|
||||
const configSync = Object.create(ConfigSync.prototype) as ConfigSync;
|
||||
@@ -102,9 +102,13 @@ describe("ConfigSync commands", () => {
|
||||
},
|
||||
},
|
||||
periodicPluginSweepProcessor,
|
||||
pluginList: [],
|
||||
pluginListGeneration: 0,
|
||||
loadedManifest_mTime: new Map(),
|
||||
pluginScanProcessor: { clearPending: vi.fn(), stop: vi.fn(async () => {}) },
|
||||
});
|
||||
|
||||
configSync.onunload();
|
||||
await configSync.onunload();
|
||||
|
||||
expect(cancelTask).toHaveBeenCalledWith("config-sync:updated-configuration");
|
||||
expect(notices.hide).toHaveBeenCalledWith("config-sync:updated-configuration");
|
||||
|
||||
Reference in new issue
Block a user