🤯 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 { expect, it } from 'vitest';
const legacyCreateTask = (input: { instruction?: string; prompt?: string }) => {
const instruction = input.instruction ?? input.prompt;
if (!instruction?.trim()) throw new Error('Missing task instruction');
return { instruction };
};
it('translates supported legacy input and rejects invalid input', () => {
expect(legacyCreateTask({ prompt: 'Launch' })).toEqual({ instruction: 'Launch' });
expect(() => legacyCreateTask({ prompt: '' })).toThrow('Missing task instruction');
});