Skip to content

Commit 4d143df

Browse files
justin808claude
andcommitted
Add missing serverWebpackConfig.js assertions to --rsc-pro test
The --rsc context had two serverWebpackConfig.js tests (RSCWebpackPlugin import and rscBundle parameter) that weren't carried over to --rsc-pro. Since both modes generate the same serverWebpackConfig.js, these assertions should be mirrored to fully close the coverage gap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3e62c73 commit 4d143df

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,20 @@ class ActiveSupport::TestCase
17771777
end
17781778
end
17791779

1780+
it "serverWebpackConfig includes RSCWebpackPlugin import" do
1781+
assert_file "config/webpack/serverWebpackConfig.js" do |content|
1782+
expect(content).to include("RSCWebpackPlugin")
1783+
expect(content).to include("react-on-rails-rsc/WebpackPlugin")
1784+
end
1785+
end
1786+
1787+
it "serverWebpackConfig has rscBundle parameter" do
1788+
assert_file "config/webpack/serverWebpackConfig.js" do |content|
1789+
expect(content).to match(/configureServer\s*=\s*\(rscBundle\s*=\s*false\)/)
1790+
expect(content).to include("if (!rscBundle)")
1791+
end
1792+
end
1793+
17801794
it "sets DEFAULT_ROUTE to hello_server in bin/dev" do
17811795
assert_file "bin/dev" do |content|
17821796
expect(content).to include('DEFAULT_ROUTE = "hello_server"')

0 commit comments

Comments
 (0)