DEV: Add a spec for assets:precompile:js_processor (#23220)

This commit is contained in:
Jarek Radosz
2023-08-25 11:44:30 +02:00
committed by GitHub
parent 5d5e919530
commit 3ce3c2ff81
3 changed files with 24 additions and 4 deletions

View File

@ -0,0 +1,18 @@
# frozen_string_literal: true
RSpec.describe "assets:precompile" do
before do
Rake::Task.clear
Discourse::Application.load_tasks
end
describe "assets:precompile:js_processor" do
it "compiles the js processor" do
out = capture_stdout { Rake::Task["assets:precompile:js_processor"].invoke }
expect(out).to match(%r{Compiled js-processor: tmp/js-processor})
path = out.match(/: (.+)/)[1]
expect(File.exist?(path)).to eq(true)
end
end
end