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.

311 B
Raw Blame
import { expect, it, vi } from 'vitest';

const readiness = async (probe: () => Promise<boolean>) => ({
  status: (await probe()) ? 200 : 503,
});

it('reports unavailable when its dependency is unhealthy', async () => {
  expect(await readiness(vi.fn().mockResolvedValue(false))).toEqual({ status: 503 });
});