Commit 7680371a by Michael Mifsud

Merge pull request #1223 from jameslnewell/master

Added a test for #1219
parents 3467c932 97cfba99
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment