diff --git a/docs/superpowers/plans/2026-04-22-web-ui-auth.md b/docs/superpowers/plans/2026-04-22-web-ui-auth.md index 01d45ba3..39facda0 100644 --- a/docs/superpowers/plans/2026-04-22-web-ui-auth.md +++ b/docs/superpowers/plans/2026-04-22-web-ui-auth.md @@ -153,7 +153,7 @@ Create `web/src/lib/api/client.test.ts`: ```ts import { afterEach, describe, expect, test, vi } from 'vitest'; -import { apiFetch, type ApiError } from './client'; +import { apiFetch } from './client'; afterEach(() => { vi.unstubAllGlobals(); @@ -191,7 +191,7 @@ describe('apiFetch', () => { test('throws ApiError from error envelope on 4xx', async () => { stubFetch(404, { error: { code: 'not_found', message: 'track not found' } }); - await expect(apiFetch('/api/tracks/x')).rejects.toMatchObject({ + await expect(apiFetch('/api/tracks/x')).rejects.toMatchObject({ code: 'not_found', message: 'track not found', status: 404 @@ -202,7 +202,7 @@ describe('apiFetch', () => { vi.stubGlobal('fetch', vi.fn().mockResolvedValue( new Response('500', { status: 500, statusText: 'Internal Server Error' }) )); - await expect(apiFetch('/api/ping')).rejects.toMatchObject({ + await expect(apiFetch('/api/ping')).rejects.toMatchObject({ code: 'unknown', message: 'Internal Server Error', status: 500