-- expect.extend: Response 의 본문이 Zod 스키마에 맞는가
toMatchSchema :: Response -> Schema -> IO MatcherResult
toMatchSchema res schema = do
body <- json res
r <- safeParseAsync schema body
pure MatcherResult { pass = success r, message = "" }
-- declare module 'vitest' { interface Matchers<R, T> { toMatchSchema: (s) => Promise<void> } }
-- 비동기 매처: 반환 타입은 R 이 아니라 Promise<void>, 테스트에서 await
-- await expect(todoResponse).toMatchSchema(todoSchema)