import { describe, it, expect } from 'vitest' import { server, http, HttpResponse } from './test-setup' import { getUpcomingMeals } from '@/api/sdk' describe('meals api (errors)', () => { it('propagates errors on invalid upcoming range', async () => { server.use( http.get('*/api/v1/meals/upcoming', () => new HttpResponse(null, { status: 400 })) ) await expect( getUpcomingMeals(new Date('2025-01-03T00:00:00Z'), new Date('2025-01-01T00:00:00Z')) ).rejects.toBeTruthy() }) })