mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 12:39:23 -03:00
fix(recipe): re-export syncChanges and add show mock to fix test
This commit is contained in:
@@ -297,6 +297,10 @@ export async function resetAndReload(updateFolders = false, options = {}) {
|
||||
* Refreshes the recipe list by triggering a backend scan, then reloading.
|
||||
* @param {boolean} fullRebuild - If true, fully rebuild the cache; if false, incremental scan
|
||||
*/
|
||||
export async function syncChanges() {
|
||||
return refreshRecipes(false);
|
||||
}
|
||||
|
||||
export async function refreshRecipes(fullRebuild = true) {
|
||||
const actionLabel = fullRebuild ? 'Rebuilding recipe cache' : 'Refreshing recipes';
|
||||
const actionToast = fullRebuild ? 'Full rebuild' : 'Refresh';
|
||||
|
||||
@@ -3,6 +3,7 @@ import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest';
|
||||
const showToastMock = vi.hoisted(() => vi.fn());
|
||||
const loadingManagerMock = vi.hoisted(() => ({
|
||||
showSimpleLoading: vi.fn(),
|
||||
show: vi.fn(),
|
||||
hide: vi.fn(),
|
||||
restoreProgressBar: vi.fn(),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user