Commit 62e1b09c by xzyfer

Update sass-spec runner to support error specs

parent 9a464158
...@@ -44,8 +44,14 @@ describe('spec', function() { ...@@ -44,8 +44,14 @@ describe('spec', function() {
file: t.src, file: t.src,
includePaths: t.paths includePaths: t.paths
}, function(error, result) { }, function(error, result) {
if (t.error) {
assert(error);
} else {
assert(!error); assert(!error);
}
if (expected) {
assert.equal(util.normalize(result.css.toString()), expected); assert.equal(util.normalize(result.css.toString()), expected);
}
done(); done();
}); });
}); });
......
...@@ -42,6 +42,7 @@ module.exports.getSuites = function() { ...@@ -42,6 +42,7 @@ module.exports.getSuites = function() {
ret[suite][test] = {}; ret[suite][test] = {};
ret[suite][test].src = join(testPath, 'input.scss'); ret[suite][test].src = join(testPath, 'input.scss');
ret[suite][test].error = fs.existsSync(join(testPath, 'error'));
ret[suite][test].expected = join(testPath, 'expected_output.css'); ret[suite][test].expected = join(testPath, 'expected_output.css');
ret[suite][test].paths = [ ret[suite][test].paths = [
testPath, testPath,
......
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