Skip to content

Commit

Permalink
Add regression test for #89
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Apr 4, 2024
1 parent 7c57787 commit b51c43d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/custom_importer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@ def test_custom_importer_works
CSS
end

def test_custom_importer_works_for_file_in_parent_dir
temp_dir('sub')
temp_file('a.scss', 'a {b: c}')
temp_file('sub/b.scss', '@import "../a"')

data = <<~SCSS
@import "sub/b.scss";
SCSS

engine = Engine.new(data, {
importer: CustomImporter
})

assert_equal <<~CSS, engine.render
a {
b: c;
}
CSS
end

def test_dependency_list
base = Dir.pwd

Expand Down

0 comments on commit b51c43d

Please sign in to comment.