jest-test-frameworklisted
Install: claude install-skill FortiumPartners/ensemble
# Jest Test Framework
## Purpose
Provide comprehensive Jest test execution and generation capabilities for JavaScript and TypeScript projects, supporting:
- Test file generation from bug reports
- Test execution with detailed output parsing
- Unit, integration, and E2E test patterns
- TypeScript and modern JavaScript syntax
## Usage
### Generate Test File
Create a test file from a bug report or feature description:
```bash
node generate-test.js \
--source src/components/Button.js \
--output tests/components/Button.test.js \
--type unit \
--description "Button component fails to handle click events"
```
### Execute Tests
Run Jest tests and return structured results:
```bash
node run-test.js \
--file tests/components/Button.test.js \
--config jest.config.js
```
## Command Line Options
### generate-test.js
- `--source <path>` - Source file to test (required)
- `--output <path>` - Output test file path (required)
- `--type <unit|integration|e2e>` - Test type (default: unit)
- `--description <text>` - Bug description or test purpose
- `--framework <react|node|express>` - Framework-specific patterns
### run-test.js
- `--file <path>` - Test file to execute (required)
- `--config <path>` - Jest config file (optional)
- `--coverage` - Run with coverage report
- `--watch` - Run in watch mode (not recommended for CI)
## Output Format
### Test Generation
Returns JSON with generated test file information:
```json
{
"success": true,
"testFile": "tests/comp