Commit 3f656181 by Brett Wilkins

Removing bad tests and adding new explicit tests for renderSync

parent 7a9ecbcd
...@@ -30,13 +30,17 @@ var expectedRender = '#navbar {\n\ ...@@ -30,13 +30,17 @@ var expectedRender = '#navbar {\n\
describe("compile scss", function() { describe("compile scss", function() {
it("should compile", function(done) { it("should compile with render", function(done) {
sass.render(scssStr, function(err, css) { sass.render(scssStr, function(err, css) {
done(err); done(err);
}); });
}); });
it("should match compiled string", function(done) { it("should compile with renderSync", function(done) {
done(assert.ok(sass.renderSync(scssStr)));
});
it("should match compiled string with render", function(done) {
sass.render(scssStr, function(err, css) { sass.render(scssStr, function(err, css) {
if (!err) { if (!err) {
done(assert.equal(css, expectedRender)); done(assert.equal(css, expectedRender));
...@@ -46,22 +50,8 @@ describe("compile scss", function() { ...@@ -46,22 +50,8 @@ describe("compile scss", function() {
}); });
}); });
it("should execute asynchronously", function(done) { it("should match compiled string with renderSync", function(done) {
var inside, outside; done(assert.equal(sass.renderSync(scssStr), expectedRender));
inside = outside = false;
sass.render(scssStr, function (err, css) {
inside = Date.now();
});
outside = Date.now();
done(assert.ok(!inside) && assert.notEqual(outside, false));
});
it("should execute synchronously", function(done) {
var output = sass.renderSync(scssStr);
done(assert.ok(output));
}); });
it("should throw an exception for bad input", function(done) { it("should throw an exception for bad input", function(done) {
......
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