peerpigeon
Version:
WebRTC-based peer-to-peer mesh networking library with intelligent routing and signaling server
81 lines (58 loc) • 3.02 kB
Markdown
# Test Cleanup - Complete ✅
## Summary
Removed unused and unnecessary test files to streamline the test suite.
## Removed Files
### ❌ `test/event-emitter-test.js` (184 lines)
**Reason:** Unit test that was never integrated into CI or package.json scripts.
- Was a standalone test for EventEmitter methods
- Not referenced anywhere in the codebase
- If EventEmitter testing is needed, should be added to proper test framework
### ❌ `test/manual-video-test.js` (967 lines)
**Reason:** Superseded by `manual-video-streaming-test.js`
- Old manual video test implementation
- Never added to package.json scripts
- The newer `manual-video-streaming-test.js` is actively maintained and in package.json
### ❌ `test/run-video-streaming-test.js` (103 lines)
**Reason:** Unnecessary wrapper script
- Just a wrapper that spawns `video-streaming-test.js`
- Adds no real value - users can run tests directly with environment variables
- Example: `HEADLESS=false node test/video-streaming-test.js`
## Updated
### ✏️ `package.json`
- Removed `test:video:runner` script (pointed to deleted run-video-streaming-test.js)
## Remaining Tests
The test suite now contains only actively used tests:
### ✅ `test/browser-integration-test.js`
- **Purpose:** Main integration test for browser functionality
- **npm scripts:** `npm test`, `npm run test:browser`, `npm run test:browser:visual`
- **Used in:** CI pipeline (`npm run ci`)
### ✅ `test/video-streaming-test.js`
- **Purpose:** Automated video streaming tests (1:1, 1:many, many:many)
- **npm scripts:** `npm run test:video`, `npm run test:video:visual`
### ✅ `test/manual-video-streaming-test.js`
- **Purpose:** Interactive manual video streaming test with CLI controls
- **npm scripts:** `npm run test:video:manual`, `npm run test:video:manual:visual`
## Available Test Commands
```bash
# Main tests (runs in CI)
npm test # Browser integration test (headless)
npm run ci # Run lint + tests
# Browser tests
npm run test:browser # Browser integration (headless)
npm run test:browser:visual # Browser integration (headed)
# Video streaming tests
npm run test:video # Automated video tests (headless)
npm run test:video:visual # Automated video tests (headed)
npm run test:video:manual # Manual interactive test (headless)
npm run test:video:manual:visual # Manual interactive test (headed)
# Storage tests
npm run test:storage # Storage functionality test
```
## Benefits
1. **Cleaner codebase** - Removed ~1,254 lines of unused test code
2. **Less confusion** - No duplicate or abandoned tests
3. **Easier maintenance** - Only maintaining tests that are actually run
4. **Clear test suite** - All remaining tests are documented in package.json
## Migration Notes
- If you were using `test:video:runner`, use `test:video` or `test:video:visual` instead
- If you need headless/headed mode, use the `:visual` variants or set `HEADLESS=false`