🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
import { describe, expect, it, vi } from 'vitest';
const { onArtboardToolResult } = vi.hoisted(() => ({ onArtboardToolResult: vi.fn() }));
vi.mock('@/features/Artboard/data/onArtboardToolResult', () => ({ onArtboardToolResult }));
const { artboardHookExecutor } = await import('./artboard');
describe('artboardHookExecutor', () => {
it('hands every artboard tool_end to the board refresh', async () => {
const result = { state: { artboardId: 'art_1' }, success: true };
await artboardHookExecutor.onAfterCall({
apiName: 'updateArtboard',
identifier: 'builtin-artboard',
params: {},
result,
});
expect(onArtboardToolResult).toHaveBeenCalledWith({ apiName: 'updateArtboard', result });
expect(artboardHookExecutor.getApiNames()).toEqual([]);
});
});