Revision 41996be86f326f667e755cfa953d32befbfa3076 authored by Alex Lam S.L on 09 May 2017, 18:43:12 UTC, committed by GitHub on 09 May 2017, 18:43:12 UTC
Travis has gone a lot slower recently, and most test failures are due to time-out on this particular test.
1 parent 5fd8244
mocha.js
var Mocha = require('mocha'),
fs = require('fs'),
path = require('path');
// Instantiate a Mocha instance.
var mocha = new Mocha({});
var testDir = __dirname + '/mocha/';
// Add each .js file to the mocha instance
fs.readdirSync(testDir).filter(function(file){
// Only keep the .js files
return file.substr(-3) === '.js';
}).forEach(function(file){
mocha.addFile(
path.join(testDir, file)
);
});
module.exports = function() {
mocha.run(function(failures) {
if (failures !== 0) {
process.on('exit', function () {
process.exit(failures);
});
}
});
};
Computing file changes ...