Skip to content

Commit 6eaf87c

Browse files
justin808claude
andcommitted
Add missing rscWebpackConfig.js assertions to --rsc-pro test
Both --rsc and --rsc-pro use the same template, so the assertions should match. Adds the 3 missing checks: require path, default unwrap, and serverWebpackConfig(true) call. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b729316 commit 6eaf87c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,9 @@ class ActiveSupport::TestCase
17691769

17701770
it "creates rscWebpackConfig.js" do
17711771
assert_file "config/webpack/rscWebpackConfig.js" do |content|
1772+
expect(content).to include("const serverWebpackModule = require('./serverWebpackConfig')")
1773+
expect(content).to include("const serverWebpackConfig = serverWebpackModule.default || serverWebpackModule")
1774+
expect(content).to include("serverWebpackConfig(true)")
17721775
expect(content).to include("rsc-bundle")
17731776
expect(content).to include("react-server")
17741777
end

0 commit comments

Comments
 (0)