mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 13:13:39 +08:00
Improve specs to check top level stylesheets for SCSS compilation errors.
https://meta.discourse.org/t/fwd-growth-institute-pm-error-in-css-on-embed/66824/4
This commit is contained in:
parent
93130b15e3
commit
d3a975e99a
|
@ -2,12 +2,15 @@ require 'rails_helper'
|
|||
require 'stylesheet/compiler'
|
||||
|
||||
describe Stylesheet::Compiler do
|
||||
it "can compile desktop mobile and desktop css" do
|
||||
css,_map = Stylesheet::Compiler.compile_asset("desktop")
|
||||
expect(css.length).to be > 1000
|
||||
describe 'compilation' do
|
||||
Dir["#{Rails.root.join("app/assets/stylesheets")}/*.scss"].each do |path|
|
||||
path = File.basename(path, '.scss')
|
||||
|
||||
css,_map = Stylesheet::Compiler.compile_asset("mobile")
|
||||
expect(css.length).to be > 1000
|
||||
it "can compile '#{path}' css" do
|
||||
css, _map = Stylesheet::Compiler.compile_asset(path)
|
||||
expect(css.length).to be > 1000
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it "supports asset-url" do
|
||||
|
@ -24,5 +27,3 @@ describe Stylesheet::Compiler do
|
|||
expect(css).not_to include('image-url')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user