feat(project-config): simplify plugin and model drawers
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import {
|
||||
dispatchPluginWorkspaceCommand,
|
||||
settlePluginWorkspaceLoads,
|
||||
type PluginWorkspaceDispatchDependencies,
|
||||
} from '@/pages/Plugins/plugin-workspace-controller';
|
||||
import type { PluginWorkspaceCommand } from '@/pages/Plugins/plugin-workspace-model';
|
||||
@@ -70,19 +69,4 @@ describe('plugin workspace controller', () => {
|
||||
]);
|
||||
expect(deps.openSettings).toHaveBeenCalledExactlyOnceWith();
|
||||
});
|
||||
|
||||
it('starts every available source load even when one source rejects', async () => {
|
||||
const catalog = vi.fn().mockRejectedValue(new Error('catalog offline'));
|
||||
const library = vi.fn().mockResolvedValue(undefined);
|
||||
const device = vi.fn().mockResolvedValue(undefined);
|
||||
const project = vi.fn().mockResolvedValue(undefined);
|
||||
|
||||
const results = await settlePluginWorkspaceLoads({ catalog, library, device, project });
|
||||
|
||||
expect(catalog).toHaveBeenCalledOnce();
|
||||
expect(library).toHaveBeenCalledOnce();
|
||||
expect(device).toHaveBeenCalledOnce();
|
||||
expect(project).toHaveBeenCalledOnce();
|
||||
expect(results.map(({ status }) => status)).toEqual(['rejected', 'fulfilled', 'fulfilled', 'fulfilled']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user