Commit cb426de
Fix buildConsoleReplay test parameter order regression (#2168)
## Summary
Fixes the failing `buildConsoleReplay.test.js` tests by correcting the
parameter order in test calls.
## Problem
Commit c3a0225 (Phase 5: Add Pro Node Renderer Package to workspace
#2069) incorrectly changed test calls from:
```javascript
buildConsoleReplay(undefined, 0, 'abc123') // correct
```
to:
```javascript
buildConsoleReplay(0, undefined, 'abc123') // incorrect
```
The function signature is `buildConsoleReplay(customConsoleHistory,
numberOfMessagesToSkip, nonce)`, so passing `0` as the first parameter
caused:
1. `customConsoleHistory = 0` instead of `undefined`
2. Nullish coalescing `0 ?? console.history` returns `0` (not
`console.history`)
3. `!Array.isArray(0)` returns `true`, causing early return of `''`
## Fix
Restored the correct parameter order in 3 test calls (lines 81, 90,
115).
## Test plan
- [x] `pnpm jest tests/buildConsoleReplay.test.js` - All 14 tests pass
Fixes #2167
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Updated test cases for console replay functionality to reflect refined
argument patterns while maintaining existing validation expectations.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent 14fa12a commit cb426de
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments