2018-06-06 12:03:45 +00:00
|
|
|
var path = require("path");
|
|
|
|
var fs = require("fs");
|
|
|
|
|
|
|
|
fs.readdir(__dirname, function(err, files) {
|
|
|
|
if(err) {
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
var tests = files.filter(function(item) {
|
2018-12-02 09:30:08 +00:00
|
|
|
return item.indexOf("spec.js") !== -1;
|
2018-06-06 12:03:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
tests.forEach(function(file) {
|
|
|
|
|
|
|
|
console.log(`: ${file}`);
|
|
|
|
|
2019-01-13 21:47:55 +00:00
|
|
|
var me = fs.readFileSync(path.join(__dirname, file));
|
2018-06-06 12:03:45 +00:00
|
|
|
|
2019-01-13 21:47:55 +00:00
|
|
|
// eval maybe evil, but it is YOUR code, are you evil?
|
|
|
|
eval(me.toString()); // jshint ignore:line
|
2018-06-06 12:03:45 +00:00
|
|
|
|
|
|
|
test.run();
|
|
|
|
});
|
|
|
|
});
|