rails / jsbundling-rails

Bundle and transpile JavaScript in Rails with esbuild, rollup.js, or Webpack.
MIT License
831 stars 143 forks source link

Test installer commands #182

Closed jonathanhefner closed 1 month ago

jonathanhefner commented 8 months ago

This PR looks large because this project currently has no testing infrastructure. The vast majority of LOC in this PR are from Gemfile and Gemfile.lock files. I have split the PR into multiple commits to further clarify.


This adds test coverage for the javascript:install:bun, javascript:install:esbuild, javascript:install:rollup, and javascript:install:webpack commands. The commands are tested against a freshly generated Rails app using the version of Rails that is currently loaded. Thus the installer can be tested with different versions of Rails in CI.

Infrastructure has been added to run tests against Rails 7.0, 7.1, and main branch.

This PR takes a different approach than https://github.com/rails/dartsass-rails/pull/49 — instead of separate appraisals / gemfiles for Sprockets and Propshaft, this PR has tests that target each.