Testing
How to test Vant.
Test Command
Run tests to verify Vant works correctly.
Basic Test
Run all tests:
vant test
Runs all build tests:
- Syntax validation
- Module loading
- Brain integrity
Verbose Output
See detailed test output:
vant test --verbose
Shows all test output.
Test Types
Available test categories.
Unit Tests
Individual module tests:
node bin/build-test.js --unit
Integration Tests
Full flow tests:
node bin/build-test.js --integration
Load Tests
Brain loading tests:
node bin/build-test.js --load
Manual Testing
Test your Vant setup and agents.
Brain Loading
Test brain loading.
# Load brain
vant load
# Check output
vant health
CLI Commands
Test CLI commands:
# Test each command
vant start
vant sync
vant health
vant summary
vant rate
MCP Server
MCP server functionality.
# Start MCP
vant mcp &
# Test endpoint
curl http://localhost:3456/health
Test Patterns
Common test patterns.
Happy Path
Normal operation test.
vant start
# Expected: Brain loads, no errors
Error Handling
Handle this error case.
# Invalid token
GITHUB_TOKEN=invalid vant sync
# Expected: Error with code GITHUB_AUTH
Rate Limit
Check rate limits.
# Exhaust rate limit
for i in {1..100}; do vant sync; done
# Expected: RATE_LIMIT error
Brain Corruption
Handle corrupted brain files.
# Delete brain file
rm models/public/identity.md
# Reload
vant load
# Expected: Error with code BRAIN_LOAD_FAIL
Test Data
Key information for the plugin.
Test Brain
Create test brain:
mkdir -p models/test
echo "# Test Identity" > models/test/identity.md
echo "name: Test" >> models/test/identity.md
Test Config
Configuration options.
# Invalid config
echo "INVALID=true" > config.ini
vant health
# Expected: Error with code CONFIG_INVALID
CI/CD Testing
Test your Vant setup and agents.
GitHub Actions
Fix GitHub connection issues.
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
run: npm install
- name: Test
run: vant test
Debugging
Debug test failures.
Verbose Mode
Show detailed output.
VERBOSE=true vant start
Trace Mode
Trace test execution.
TRACE=true vant start
Log Output
Logging configuration.
vant start 2>&1 | tee vant.log
See also: CLI Reference, Troubleshooting