- Node.js 22+ and npm
- Node.js 22+ and npm
- Python 3.8+ (for pytest reporter)
- PHP 8.1+ and Composer (for PHPUnit reporter)
- Go 1.21+ (for Go reporter)
- Ruby 2.7+ and Bundler (for RSpec reporter)
- Rust 1.70+ and Cargo (for Rust reporter)
- Storybook <= 9.x (for Storybook reporter)
For a consistent development environment with all dependencies pre-installed, see the devcontainer setup guide.
Before running tests, install dependencies and build the TypeScript packages:
# Install dependencies
npm install
# Build the main package and all workspaces
npm run buildThe main test suite covers the core TDD Guard functionality:
# Run all tests
npm test
# Run unit tests only (faster)
npm run test:unit
# Run integration tests
npm run test:integrationReporter tests verify the language-specific test result collectors.
First, install the language-specific dependencies:
# Install PHPUnit dependencies
composer install -d reporters/phpunit
# Set up Python virtual environment and install pytest
python3 -m venv reporters/pytest/.venv
reporters/pytest/.venv/bin/pip install -e reporters/pytest pytest
# Build Go reporter
go build -C reporters/go ./cmd/tdd-guard-go
# Install RSpec dependencies
bundle install --gemfile=reporters/rspec/Gemfile
# Build Rust reporter
cargo build --release --manifest-path reporters/rust/Cargo.toml# Run all reporter tests
npm run test:reportersThe project uses ESLint, Prettier, and TypeScript for code quality:
# Run all checks (typecheck, lint, format, test)
npm run checks
# Individual commands
npm run typecheck # Type checking
npm run lint # Lint and auto-fix
npm run format # Format code with PrettierIf you get composer errors:
- Ensure PHP 8.1+ is installed:
php --version - Ensure Composer is installed:
composer --version
If you get Python errors:
- Ensure Python 3.8+ is installed:
python3 --version - On some systems, you may need to install python3-venv:
sudo apt install python3-venv
If you get Ruby errors:
- Ensure Ruby 2.7+ is installed:
ruby --version - Ensure Bundler is installed:
bundle --version - If Bundler is missing:
gem install bundler
If you get Rust errors:
- Ensure Rust 1.70+ is installed:
rustc --version - Ensure Cargo is installed:
cargo --version - If Rust is missing: Install from rustup.rs