| title | Gateway Testing |
|---|---|
| description | Testing commands and workflows for the DeployStack Gateway |
| sidebar | Testing |
| icon | TestTube |
The DeployStack Gateway includes testing infrastructure for ensuring reliability and quality of the CLI application.
npm run test:unitCurrently displays a placeholder message as tests are not yet implemented.
npm run lintRuns ESLint with automatic fixing of common issues. Essential for maintaining code quality.
npm run buildCompiles TypeScript to JavaScript and verifies the build process.
npm run devStarts the gateway in development mode with hot reload using ts-node-dev.
npm run linkLinks the local gateway for testing CLI commands globally.
After linking, test commands directly:
deploystack version
deploystack status
deploystack --helpnpm run releaseRuns linting checks before creating a release through release-it.
The GitHub Actions workflow automatically runs:
- Build verification
- Linting checks
- Unit tests (when implemented)
- Command validation: Ensure all commands parse correctly
- Output formatting: Verify chalk styling and user messages
- Error handling: Test failure scenarios and exit codes
- Cross-platform: Validate behavior on Windows, macOS, and Linux
- Authentication flows: Test login/logout workflows
- Configuration management: Verify config file operations
- Process management: Test MCP server spawning and cleanup
- Proxy functionality: Validate HTTP proxy routing
The gateway will include comprehensive testing using:
- vitest for unit testing
- supertest for HTTP endpoint testing
- msw for API mocking
- Cross-platform testing in CI/CD
# Check command structure
deploystack --help
# Verify version info
deploystack version
# Test error handling
deploystack invalid-commandnpm run lint # Fix code style issues
npm run build # Verify compilation
npm run link # Test locallyThis testing approach ensures the gateway maintains high quality while remaining focused on the essential CLI functionality.