Skip to content

Commit 5081242

Browse files
ihabadhamclaude
andcommitted
test: assert all four Rspack pins in bin/switch-bundler
The bin/switch-bundler version-pin test only spot-checked @rspack/core and webpack. A drift in @rspack/cli or @rspack/plugin-react-refresh within the RSPACK_DEPS constant would silently pass the existing assertions. Add assertions for the remaining two rspack pins so future version changes to bin/switch-bundler cannot regress without a test failure. The sibling test "installs rspack dependencies in package.json" already checks all four rspack packages (for the generated package.json), so this also brings the switch-bundler test into consistency with the adjacent pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent acad445 commit 5081242

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ class ActiveSupport::TestCase
668668
assert_file "bin/switch-bundler" do |content|
669669
# Version pins are present in the constants
670670
expect(content).to include("@rspack/core@^2.0.0-0")
671+
expect(content).to include("@rspack/cli@^2.0.0-0")
672+
expect(content).to include("@rspack/plugin-react-refresh@^2.0.0")
671673
expect(content).to include("webpack@^5.0.0")
672674
# Version-stripping regex is used for package.json key deletion
673675
expect(content).to include('dep[%r{\A(@[^/]+/[^@]+|[^@]+)}]')

0 commit comments

Comments
 (0)