Skip to content

Add Vitest test suite (58 tests)#4

Open
dines-rl wants to merge 2 commits intomainfrom
agent/add-vitest-tests
Open

Add Vitest test suite (58 tests)#4
dines-rl wants to merge 2 commits intomainfrom
agent/add-vitest-tests

Conversation

@dines-rl
Copy link
Copy Markdown
Owner

@dines-rl dines-rl commented Mar 2, 2026

Summary

  • Installs Vitest + jsdom as dev dependencies and adds `test`, `test:watch`, `test:coverage` scripts to `package.json`
  • Configures Vitest in `vite.config.ts` with the `jsdom` environment
  • Adds 58 tests across 4 test files covering image analysis, visualization, and AI service modules

Test plan

  • `npm test` passes all 58 tests locally
  • No existing source files were modified

🤖 Generated with Claude Code

Sets up Vitest with jsdom, adds npm test scripts, and writes 58 tests
covering analyzeColors, analyzeEdges, analyzePatterns, analyzeContent,
generateMermaidDiagram, ai-providers, and openai service modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 2, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 23.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

- analyzePatterns: image ≤ 3px returns 0 patterns (loop never enters)
- analyzeContent: error screen boundary checks for darkRatio=0.2 and
  lightRatio=0.6 (strict inequality conditions)
- generateMermaidDiagram: parentheses preserved by sanitizer; classDef
  section always present
- ai-providers (Claude): generic error re-throws original message;
  message history accumulates across multiple turns
- openai: null message.content falls back to default string

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant