-
-
Notifications
You must be signed in to change notification settings - Fork 638
Fix incremental render tests #2032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incremental render tests #2032
Conversation
…est failures Commit 7605907 added async/stream helper functions to bundle.js and secondary-bundle.js to support new incremental render tests. However, these changes broke existing tests in vm.test.ts, handleRenderRequest.test.ts, and worker.test.ts that expected the original minimal bundle fixtures. Create separate bundle-incremental.js and secondary-bundle-incremental.js fixtures specifically for the 6 new incremental render tests, allowing the original fixtures to be restored to their simple 3-line versions. This isolates incremental render functionality while maintaining backward compatibility with existing tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Update all test assertions to access the response property from the returned object, as handleRenderRequest now returns { response, executionContext } instead of the response directly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
…t 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]>
Updated two failing tests to reflect the architectural change where bundles are now uploaded via a separate POST to /upload-assets instead of being included in the render request form data: - "reuploads bundles when bundle not found on renderer" - "raises duplicate bundle upload error when server asks for bundle twice" Both tests now properly mock the /upload-assets endpoint and verify that bundles are uploaded separately from render requests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code ReviewThank you for working on fixing the incremental render tests! Here's my review: ✅ Positive Aspects
|
8170fd8
into
abanoubghadban/pro509/make-renderer-use-ndjson-for-communication
Fix tests and refactor fixtures after NDJSON renderer changes - Fix request_spec.rb, handleRenderRequest, and serverRenderRSCReactComponent tests for new response structure - Separate incremental render fixtures from base test fixtures to prevent interference - Remove obsolete promise-based incremental render tests - Refactor VM bundle creation to use serverBundleCachePath - Clean up unneeded buildConfig call
Fix tests and refactor fixtures after NDJSON renderer changes - Fix request_spec.rb, handleRenderRequest, and serverRenderRSCReactComponent tests for new response structure - Separate incremental render fixtures from base test fixtures to prevent interference - Remove obsolete promise-based incremental render tests - Refactor VM bundle creation to use serverBundleCachePath - Clean up unneeded buildConfig call
Fix tests and refactor fixtures after NDJSON renderer changes - Fix request_spec.rb, handleRenderRequest, and serverRenderRSCReactComponent tests for new response structure - Separate incremental render fixtures from base test fixtures to prevent interference - Remove obsolete promise-based incremental render tests - Refactor VM bundle creation to use serverBundleCachePath - Clean up unneeded buildConfig call
Summary
fixes #2031
Remove this paragraph and provide a general description of the code changes in your pull
request... were there any bugs you had fixed? If so, mention them. If
these bugs have open GitHub issues, be sure to tag them here as well,
to keep the conversation linked together.
Pull Request checklist
Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by
~.Add the CHANGELOG entry at the top of the file.
Other Information
Remove this paragraph and mention any other important and relevant information such as benchmarks.
This change is