feat: Add automated testing with Vitest and Playwright

- Install Vitest (integration tests for API routes) and Playwright (E2E tests)
- Add vitest.config.ts, playwright.config.ts, src/test/setup.ts
- Add test scripts: npm test, npm run test:e2e, npm run test:all
- Backend skill: writes integration tests for each API route
- QA skill: checks Playwright browser install, runs both suites,
  writes E2E tests from acceptance criteria as permanent regression suite
- Fix all skill frontmatter: remove unsupported context/agent/model/allowed-tools,
  fix argument-hint to be a quoted string
- Fix broken relative paths to docs/production/ in deploy and backend skills
- Update README with playwright install step and test script reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
“alexvisualmakers”
2026-03-30 15:34:32 +02:00
parent 0225214b0b
commit 5eceaeeb92
13 changed files with 2111 additions and 64 deletions

View File

@@ -12,6 +12,7 @@ This template uses [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
git clone https://github.com/YOUR_USERNAME/ai-coding-starter-kit.git my-project
cd my-project
npm install
npx playwright install chromium # one-time: installs browser for E2E tests (~300MB)
```
### 2. (Optional) Supabase Setup
@@ -301,10 +302,13 @@ Standalone guides in `docs/production/`:
## Scripts
```bash
npm run dev # Development server (localhost:3000)
npm run build # Production build
npm run start # Production server
npm run lint # ESLint
npm run dev # Development server (localhost:3000)
npm run build # Production build
npm run start # Production server
npm run lint # ESLint
npm test # Vitest: integration tests for API routes
npm run test:e2e # Playwright: E2E tests for user flows
npm run test:all # Run both test suites
```
---