mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
feat: migrate test runner from Bun to Vitest
- Replace bun:test with Vitest across all 22 test files - Create @sofa/test package with shared setup and DB test helpers - setup.ts: vi.mock for @sofa/db/client, Bun.randomUUIDv7 polyfill - db.ts: in-memory SQLite via better-sqlite3, seed helpers - Add per-project vitest configs (packages/core, apps/web) - Add root vitest.config.ts with projects and v8 coverage - Set up @vitest/browser + Playwright for web component tests - Move validateBackupDatabase from core/backup.ts to @sofa/db/client - Derive required backup tables from schema instead of hard-coded list - Update CI workflow with Playwright install and Codecov upload - Update CLAUDE.md documentation for Vitest Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import packageJson from "../apps/server/package.json" with { type: "json" };
|
||||
import {
|
||||
generateOpenApiSpec,
|
||||
openApiTags,
|
||||
} from "../apps/server/src/orpc/openapi-spec";
|
||||
import { generateOpenApiSpec, openApiTags } from "../apps/server/src/orpc/openapi-spec";
|
||||
|
||||
const spec = await generateOpenApiSpec({
|
||||
title: "Sofa API",
|
||||
@@ -54,9 +51,7 @@ for (const pathItem of Object.values(spec.paths ?? {})) {
|
||||
const method = pathItem[key];
|
||||
if (!method?.requestBody || !("content" in method.requestBody)) continue;
|
||||
const content = method.requestBody.content;
|
||||
const unsupported = Object.keys(content).filter(
|
||||
(type) => !supportedMediaTypes.has(type),
|
||||
);
|
||||
const unsupported = Object.keys(content).filter((type) => !supportedMediaTypes.has(type));
|
||||
if (unsupported.length > 0) {
|
||||
// Replace unsupported types with a single multipart/form-data entry
|
||||
for (const type of unsupported) delete content[type];
|
||||
|
||||
Reference in New Issue
Block a user