diff --git a/scripts/build.js b/scripts/build.js index 7c38d92a1..55154821c 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -115,10 +115,6 @@ function testBinary(options) { return build(options); } - if (process.env.SKIP_NODE_SASS_TESTS) { - return; - } - fs.stat(path.join(__dirname, '..', 'vendor', options.bin, 'binding.node'), function (err) { if (err) { return build(options); @@ -126,22 +122,16 @@ function testBinary(options) { console.log('`' + options.bin + '` exists; testing'); - var total; - var failures; var mocha = new Mocha({ ui: 'bdd', - timeout: 999999, - reporter: function(stats) { - total = stats.total; - failures = stats.failures; - } + timeout: 999999 }); mocha.addFile(path.resolve(__dirname, '..', 'test', 'api.js')); - mocha.run(function () { - if ((total - failures) * 100 / total < 90) { + mocha.grep(/should compile sass to css with file/).run(function (done) { + if (done !== 0) { console.log([ - 'Problem with the binary: ' + failures + ' of ' + total + ' tests are failing.', + 'Problem with the binary.', 'Manual build incoming.', 'Please consider contributing the release binary to https://github.com/sass/node-sass-binaries for npm distribution.' ].join('\n'));