Skip to content

Commit

Permalink
Improves binary rebuild test
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethormandy committed Sep 19, 2013
1 parent 157272b commit da06825
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if (!force) {
try {
fs.statSync(path.join(__dirname, 'bin', modPath, 'binding.node'));
console.log('`'+ modPath+ '` exists; testing');
cp.execFile(process.execPath, ['mocha test'], function(err, stdout, stderr) {
if (err || stdout !== 'pass' || stderr) {
cp.execFile(process.execPath, ['test'], function(err, stdout, stderr) {
if (err && err!==null || stdout!=='pass\n' || stderr!=='') {
console.log('Problem with the binary; manual build incoming');
console.log('Please consider contributing the release binary to node-sass for npm distribution.');
build();
Expand Down
17 changes: 6 additions & 11 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
var sass = require('./sass');

var scssStr = '#navbar {\
width: 80%;\
height: 23px; }\
#navbar ul {\
list-style-type: none; }\
#navbar li {\
float: left;\
a {\
font-weight: bold; }}';
var scssStr = '$pink: #D1586C; #navbar { background: $pink; }\n';
var expectedRender = '#navbar {\n background: #d1586c; }\n';

sass.render(scssStr, function(err, css){
console.log(css)
})
if(css === expectedRender) {
console.log('pass')
}
});

0 comments on commit da06825

Please sign in to comment.