Commit aa3b8361 by Adeel Committed by Kevin Martensson

Test: Adds back stats test.

parent c3a53e01
...@@ -245,14 +245,14 @@ describe('api', function() { ...@@ -245,14 +245,14 @@ describe('api', function() {
var start = Date.now(); var start = Date.now();
var stats = {}; var stats = {};
before(function (done) { before(function(done) {
sass.render({ sass.render({
file: fixture('include-files/index.scss'), file: fixture('include-files/index.scss'),
stats: stats, stats: stats,
success: function () { success: function() {
done(); done();
}, },
error: function (err) { error: function(err) {
assert(!err); assert(!err);
done(); done();
} }
...@@ -301,7 +301,7 @@ describe('api', function() { ...@@ -301,7 +301,7 @@ describe('api', function() {
sass.render({ sass.render({
file: fixture('simple/index.scss'), file: fixture('simple/index.scss'),
stats: stats, stats: stats,
success: function () { success: function() {
assert.deepEqual(stats.includedFiles, [expected]); assert.deepEqual(stats.includedFiles, [expected]);
done(); done();
} }
...@@ -312,7 +312,7 @@ describe('api', function() { ...@@ -312,7 +312,7 @@ describe('api', function() {
sass.render({ sass.render({
data: read(fixture('simple/index.scss'), 'utf8'), data: read(fixture('simple/index.scss'), 'utf8'),
stats: stats, stats: stats,
success: function () { success: function() {
assert.equal(stats.entry, 'data'); assert.equal(stats.entry, 'data');
done(); done();
} }
...@@ -323,7 +323,7 @@ describe('api', function() { ...@@ -323,7 +323,7 @@ describe('api', function() {
sass.render({ sass.render({
data: read(fixture('simple/index.scss'), 'utf8'), data: read(fixture('simple/index.scss'), 'utf8'),
stats: stats, stats: stats,
success: function () { success: function() {
assert.deepEqual(stats.includedFiles, []); assert.deepEqual(stats.includedFiles, []);
done(); done();
} }
...@@ -335,7 +335,7 @@ describe('api', function() { ...@@ -335,7 +335,7 @@ describe('api', function() {
var start = Date.now(); var start = Date.now();
var stats = {}; var stats = {};
before(function () { before(function() {
sass.renderSync({ sass.renderSync({
file: fixture('include-files/index.scss'), file: fixture('include-files/index.scss'),
stats: stats stats: stats
...@@ -408,5 +408,18 @@ describe('api', function() { ...@@ -408,5 +408,18 @@ describe('api', function() {
assert.deepEqual(stats.includedFiles, []); assert.deepEqual(stats.includedFiles, []);
done(); done();
}); });
it('should report correct sourceMap in stats with renderSync', function(done) {
var stats = {};
sass.renderSync({
file: fixture('simple/index.scss'),
outFile: fixture('simple/index.css'),
stats: stats,
sourceMap: true
});
done(assert.ok(stats.sourceMap.indexOf('index.scss') !== -1));
});
}); });
}); });
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