Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Vitest Example

A simple TypeScript calculator demonstrating Vitest with JSON report generation for Gaffer.

Setup

npm install

Running Tests

# Run tests (basic)
npm test

# Run tests with JSON output
npm run test:json

Report Output

  • Vitest JSON: reports/vitest-results.json

Uploading to Gaffer

Using curl

curl -X POST https://app.gaffer.sh/api/upload \
  -H "X-API-Key: $GAFFER_UPLOAD_TOKEN" \
  -F "files=@reports/vitest-results.json"

Using GitHub Action

See .github/workflows/vitest.yml for the full workflow.