shiptested
v0.2.3
Published
AI-powered test generation for TypeScript and JavaScript projects
Downloads
42
Maintainers
Readme
shiptested
AI tests that actually pass.
shiptested generates tests for your TypeScript and JavaScript projects, runs them, fixes failures, and iterates until every test is green. Other tools just generate test files. ShipTested closes the loop.
Quick Start
npx shiptested generateInstallation
npm install -g shiptestedCommands
shiptested generate [path]
Generate, run, and fix tests for your project.
| Flag | Description |
|------|-------------|
| --files | Comma-separated list of specific files to test |
| --max-iterations | Maximum fix iterations (default: 3) |
| --framework | Override test framework: vitest, jest, or mocha |
| --ci | Non-interactive CI mode |
| --json | Output results as JSON |
| --all | Test all files in the project |
| --changed-only | Only test files changed in git |
| --diff-base | Git ref to diff against (default: HEAD~1) |
| --threshold | Minimum pass rate percentage to exit 0 (default: 100) |
# Generate tests for the current directory
shiptested generate
# Generate tests for a specific path
shiptested generate src/utils
# Only test changed files in CI
shiptested generate --changed-only --ci
# Set a minimum pass threshold
shiptested generate --threshold 80shiptested init [path]
Initialize a ShipTested configuration file.
| Flag | Description |
|------|-------------|
| --force | Overwrite existing config |
shiptested login
Authenticate with ShipTested.
| Flag | Description |
|------|-------------|
| --api-url | Custom API URL |
shiptested logout
Sign out from ShipTested.
Configuration
ShipTested looks for config files in this order:
shiptested.config.tsshiptested.config.js.shiptested.json"shiptested"key inpackage.json
Options
| Option | Description |
|--------|-------------|
| maxIterations | Maximum number of fix iterations |
| testFramework | Test framework to use (vitest, jest, mocha) |
| include | File patterns to include |
| exclude | File patterns to exclude |
| testDir | Directory for generated test files |
| colocate | Place test files next to source files |
| apiKey | ShipTested API key (alternative to login) |
Environment Variables
| Variable | Description |
|----------|-------------|
| SHIPTESTED_MAX_ITERATIONS | Override max iterations |
| SHIPTESTED_TEST_FRAMEWORK | Override test framework |
| SHIPTESTED_API_KEY | ShipTested API key (overrides stored credentials) |
Authentication
Run shiptested login to authenticate with your ShipTested account. Alternatively, set the SHIPTESTED_API_KEY environment variable or the apiKey config option.
Supported Frameworks
- React
- Next.js
- Express
- Hono
- TypeScript
- JavaScript
- Vitest
- Jest
Coming Soon
- Python (pytest)
- Vue
- Svelte
- Go
Links
- Website: https://www.shiptested.app
- GitHub: https://github.com/igorlourenco/shiptested
- Issues: https://github.com/igorlourenco/shiptested/issues
License
MIT
