Skip to content

Commit

Permalink
Provided initial compass compile test.
Browse files Browse the repository at this point in the history
This only tests that importing compass does not error.
  • Loading branch information
michaek committed Aug 5, 2014
1 parent d56e6dc commit a50dce0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@
"sass",
"css3"
],
"scripts": {
"test": "./node_modules/jasmine-node/bin/jasmine-node test"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
],
"devDependencies": {
"chalk": "^0.5.1",
"jasmine-node": "^1.14.5",
"node-sass": "^0.9.3"
}
}
25 changes: 25 additions & 0 deletions test/compileSpec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var sass = require('node-sass');
var chalk = require('chalk');

describe("Imports", function () {
it("should import all the provided files without an error", function (done) {
var success = jasmine.createSpy('ImportSuccess');

function complete() {
expect(success).toHaveBeenCalled();
done();
}

sass.render({
file: __dirname + "/imports.scss",
success: function(s){
success();
complete();
},
error: function(e){
complete();
console.log(chalk.red("Sass error:"), e);
}
});
});
});
1 change: 1 addition & 0 deletions test/imports.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../lib/compass";

0 comments on commit a50dce0

Please sign in to comment.