2023-08-25 17:44:30 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.describe "assets:precompile" do
|
|
|
|
before do
|
|
|
|
Rake::Task.clear
|
|
|
|
Discourse::Application.load_tasks
|
|
|
|
end
|
|
|
|
|
2023-10-02 18:36:06 +08:00
|
|
|
describe "assets:precompile:theme_transpiler" do
|
2023-08-25 17:44:30 +08:00
|
|
|
it "compiles the js processor" do
|
2023-10-19 07:00:15 +08:00
|
|
|
path = Rake::Task["assets:precompile:theme_transpiler"].actions.first.call
|
2023-08-25 17:44:30 +08:00
|
|
|
|
2024-08-02 00:59:34 +08:00
|
|
|
expect(path).to end_with("tmp/theme-transpiler.js")
|
2023-08-25 17:44:30 +08:00
|
|
|
expect(File.exist?(path)).to eq(true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|