Skip to content

Commit

Permalink
Add JavascriptPackageTest for Action Text
Browse files Browse the repository at this point in the history
This mirrors the existing `JavascriptPackageTest` tests for UJS, Action
Cable, and Active Storage.
  • Loading branch information
jonathanhefner committed Nov 5, 2023
1 parent e7d0ce9 commit a93771c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions actiontext/test/javascript_package_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require "test_helper"

class JavascriptPackageTest < ActiveSupport::TestCase
def test_compiled_code_is_in_sync_with_source_code
compiled_files = %w[
app/assets/javascripts/actiontext.js
].map do |file|
Pathname(file).expand_path("#{__dir__}/..")
end

assert_no_changes -> { compiled_files.map(&:read) } do
system "yarn build", exception: true
end
end
end

0 comments on commit a93771c

Please sign in to comment.