Skip to content

Commit

Permalink
Add test for compiled @rails/ujs
Browse files Browse the repository at this point in the history
  • Loading branch information
tricknotes committed Oct 10, 2023
1 parent 8b18d44 commit 9753982
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions actionview/test/javascript_package_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

class JavascriptPackageTest < ActiveSupport::TestCase
def test_compiled_code_is_in_sync_with_source_code
assert_no_changes -> {
%w[
app/assets/javascripts/rails-ujs.js
app/assets/javascripts/rails-ujs.esm.js
].map { |compiled_file|
File.read(File.expand_path("../#{compiled_file}", __dir__))
}
} do
system "yarn build"
end
end
end

0 comments on commit 9753982

Please sign in to comment.