12 lines
442 B
JavaScript
12 lines
442 B
JavaScript
import { describe, it, expect } from 'vitest'
|
|
import { server, http, HttpResponse } from './test-setup'
|
|
import { getRecipe } from '@/api/sdk'
|
|
|
|
describe('recipes api (errors)', () => {
|
|
it('throws on 404 getRecipe', async () => {
|
|
server.use(
|
|
http.get('*/api/v1/households/:householdSlug/recipes/:id', () => new HttpResponse(null, { status: 404 }))
|
|
)
|
|
await expect(getRecipe('the-smiths', '999')).rejects.toBeTruthy()
|
|
})
|
|
})
|