Skip to content

🤯 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.

577 B
Raw Blame
import { TRPCError } from '@trpc/server';
import { expect, it } from 'vitest';

// Retired API: no input, authorization or data-dependent work in this handler.
const moveTask = async (_input: { id: string; taskId: string }) => {
  throw new TRPCError({ code: 'PRECONDITION_FAILED', message: 'Project moves are disabled' });
};

// alint-expect
it('returns the disabled status from moveTask', async () => {
  await expect(moveTask({ id: 'target', taskId: 'parent' })).rejects.toMatchObject({
    code: 'PRECONDITION_FAILED',
    message: 'Project moves are disabled',
  });
});