Commit 0d93647e by kiran

Added test for an issue found in the output of stats.includedFiles

parent 2bba7936
......@@ -412,6 +412,37 @@ describe('api', function() {
});
});
describe('.render({stats: {}}) with data', function() {
var stats = {};
before(function(done) {
sass.render({
data: read(fixture('include-files/index.scss'), 'utf8'),
includePaths: [fixture('include-files')],
stats: stats,
success: function() {
done();
},
error: function(err) {
assert(!err);
done();
}
});
});
it('should contain an array of all included files', function(done) {
var expected = [
fixture('include-files/bar.scss').replace(/\\/g, '/'),
fixture('include-files/foo.scss').replace(/\\/g, '/'),
fixture('include-files/index.scss').replace(/\\/g, '/')
];
assert.equal(stats.includedFiles[0], expected[0]);
assert.equal(stats.includedFiles[1], expected[1]);
assert.equal(stats.includedFiles[2], expected[2]);
done();
});
});
describe('.renderSync({stats: {}})', function() {
var start = Date.now();
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