import { describe, it, expect } from 'vitest' import { server, http, HttpResponse } from './test-setup' import { getPersonsInHome } from '@/api/sdk' describe('persons api errors', () => { it('propagates non-2xx errors', async () => { server.use( http.get('*/api/v1/persons', () => new HttpResponse(null, { status: 422 })) ) await expect(getPersonsInHome()).rejects.toBeTruthy() }) })