Commit 34461aa1 by Adeel Mujahid

Merge pull request #523 from akiran/master

Added test for an issue found in the output of stats.includedFiles
parents 8e1daa15 e1d29435
...@@ -181,6 +181,29 @@ describe('api', function() { ...@@ -181,6 +181,29 @@ describe('api', function() {
} }
}); });
}); });
it('should contain an array of all included files in stats when data is passed', function(done) {
var stats = {};
sass.render({
data: read(fixture('include-files/index.scss'), 'utf8'),
includePaths: [fixture('include-files')],
stats: stats,
success: function() {
['foo', 'bar'].map(function(expect) {
var slug = fixture('include-files/' + expect + '.scss').replace(/\\/g, '/');
assert(stats.includedFiles.some(function(s) {
return s === slug;
}));
});
done();
},
error: function(err) {
assert(!err);
done();
}
});
});
}); });
describe('.renderSync(options)', function() { describe('.renderSync(options)', function() {
...@@ -412,6 +435,10 @@ describe('api', function() { ...@@ -412,6 +435,10 @@ describe('api', function() {
}); });
}); });
describe('.renderSync({stats: {}})', function() { describe('.renderSync({stats: {}})', function() {
var start = Date.now(); var start = Date.now();
var stats = {}; var stats = {};
......
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