You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,45 @@ Or build and run examples:
40
40
npm run examples:start
41
41
```
42
42
43
+
## Testing
44
+
45
+
### Unit Tests
46
+
47
+
Run unit tests with Bun:
48
+
49
+
```bash
50
+
npm test
51
+
```
52
+
53
+
### E2E Tests
54
+
55
+
E2E tests use Playwright to verify all example servers work correctly with screenshot comparisons.
56
+
57
+
```bash
58
+
# Run all E2E tests
59
+
npm run test:e2e
60
+
61
+
# Run a specific server's tests
62
+
npm run test:e2e -- --grep "Budget Allocator"
63
+
64
+
# Run tests in interactive UI mode
65
+
npm run test:e2e:ui
66
+
```
67
+
68
+
### Updating Golden Screenshots
69
+
70
+
When UI changes are intentional, update the golden screenshots:
71
+
72
+
```bash
73
+
# Update all screenshots
74
+
npm run test:e2e:update
75
+
76
+
# Update screenshots for a specific server
77
+
npm run test:e2e:update -- --grep "Three.js"
78
+
```
79
+
80
+
**Note**: Golden screenshots are platform-agnostic. Tests use canvas masking and tolerance thresholds to handle minor cross-platform rendering differences.
81
+
43
82
## Code of Conduct
44
83
45
84
This project follows our [Code of Conduct](CODE_OF_CONDUCT.md). Please review it before contributing.
0 commit comments