Commit 1ede3e2
Fix serverRenderRSCReactComponent test to pass when run with full test suite
The test was passing when run individually but failing when run with other tests due to shared configuration state.
**Root cause:**
- The test was directly mutating the global config object instead of calling buildConfig()
- It wasn't using a unique serverBundleCachePath like other tests
- When other tests ran and called buildConfig() with their own serverBundleCachePath, it would overwrite the path this test expected
- This caused the RSC bundle to look for manifest files in the wrong location
**Solution:**
1. Use the serverBundleCachePath() helper function to create a unique test-specific directory (following the pattern of other tests)
2. Call buildConfig() in beforeEach to properly set the configuration including the unique serverBundleCachePath
3. This ensures test isolation and prevents config conflicts between different test suites
**Result:**
✅ Test passes when run individually
✅ Test passes when run with full test suite (yarn test)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent da797d4 commit 1ede3e2
File tree
1 file changed
+11
-7
lines changed- react_on_rails_pro/packages/node-renderer/tests
1 file changed
+11
-7
lines changedLines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
27 | | - | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
0 commit comments