From 12bf873f392f4248458758631ef663f6cddd95b9 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 22 Apr 2026 17:26:37 -0400 Subject: [PATCH] docs(plan): fix invalid toMatchObject type-arg in auth plan vitest's toMatchObject doesn't accept a type parameter. Removed the annotation in Task 3 test code (and the unused ApiError import) so re-runs of the plan don't reintroduce the type error fixed in 8a6a496. Co-Authored-By: Claude Opus 4.7 --- docs/superpowers/plans/2026-04-22-web-ui-auth.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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