Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1223 from jameslnewell/master
Browse files Browse the repository at this point in the history
Added a test for #1219
  • Loading branch information
xzyfer committed Oct 27, 2015
2 parents 3467c93 + 97cfba9 commit 7680371
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,29 @@ describe('api', function() {
describe('.render(importer)', function() {
var src = read(fixture('include-files/index.scss'), 'utf8');

it('should still call the next importer with the resolved prev path when the previous importer returned both a file and contents property - issue #1219', function(done) {
sass.render({
data: '@import "a";',
importer: function(url, prev, done) {
if (url === 'a') {
done({
file: '/Users/me/sass/lib/a.scss',
contents: '@import "b"'
});
} else {
console.log(prev);
assert.equal(prev, '/Users/me/sass/lib/a.scss');
done({
file: '/Users/me/sass/lib/b.scss',
contents: 'div {color: yellow;}'
});
}
}
}, function() {
done();
});
});

it('should override imports with "data" as input and fires callback with file and contents', function(done) {
sass.render({
data: src,
Expand Down

0 comments on commit 7680371

Please sign in to comment.