Skip to content

Commit a00ea6f

Browse files
committed
Add: Readme for test suite
1 parent 1b6a4df commit a00ea6f

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

client/src/__tests__/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Test Suite
2+
3+
## Structure
4+
5+
```
6+
__tests__/
7+
├── unit/ # Unit tests
8+
│ ├── crdt/ # CRDT functionality
9+
│ └── webrtc/ # WebRTC manager
10+
├── integration/ # Integration tests
11+
└── utils/ # Test utilities and mocks
12+
```
13+
14+
## Running Tests
15+
16+
```bash
17+
# Run all tests
18+
npm test
19+
20+
# Run specific test file
21+
npm test <filename>
22+
23+
# Run without watch mode
24+
npm test -- --watchAll=false
25+
26+
# Run with coverage
27+
npm test -- --coverage
28+
```
29+
30+
## Test Coverage
31+
32+
### Unit Tests - CRDT (`unit/crdt/`)
33+
- **crdt-basic-operations.test.js** - Core CRDT functionality (initialization, insertions, deletions)
34+
- **crdt-concurrent-operations.test.js** - Multi-user concurrent editing scenarios
35+
- **crdt-text-operations.test.js** - Text-level abstractions
36+
- **crdt-serialization.test.js** - Document persistence and serialization
37+
- **crdt-deterministic-order.test.js** - Conflict resolution
38+
- **crdt-convergence.test.js** - Eventual consistency
39+
- **crdt-validation.test.js** - Input validation and error handling
40+
- **crdt-fixes.test.js** - Specific bug fixes and edge cases
41+
42+
### Unit Tests - WebRTC (`unit/webrtc/`)
43+
- **webrtc-manager.test.js** - WebRTC connection management
44+
45+
### Integration Tests (`integration/`)
46+
- **crdt-webrtc.test.js** - Real-time collaborative editing with WebRTC
47+
48+
### Test Utilities (`utils/`)
49+
- **webrtc-mocks.mjs** - Mock WebRTC and Socket.IO implementations

0 commit comments

Comments
 (0)