Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Build: Uses different strategy to test bins status #491

Merged
merged 1 commit into from
Oct 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,21 @@ if (!force && !process.env.SKIP_NODE_SASS_TESTS) {
fs.statSync(path.join(__dirname, 'bin', modPath, 'binding.node'));
console.log('`'+ modPath+ '` exists; testing');

var total, failures;
var mocha = new Mocha({
reporter: 'dot',
reporter: function (stats) {
total = stats.total;
failures = stats.failures;
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is a little weird here ;Pp.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add JSCS in our tests. :D

What do you propose here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than have more linting in the test suite, we need something like https://codeclimate.com/ or http://houndci.com to encourage following the styleguide.

ui: 'bdd',
timeout: 999999
});

mocha.addFile(path.resolve(__dirname, 'test', 'test.js'));

mocha.run(function (done) {
if (done !== 0) {
mocha.run(function () {
// at least 90% of tests should pass
if ((total - failures) * 100 / total < 90) {
console.log('Problem with the binary; manual build incoming');
console.log('Please consider contributing the release binary to https://github.com/sass/node-sass-binaries for npm distribution.');
build();
Expand Down