forked from haraka/Haraka
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tests
More file actions
executable file
·31 lines (27 loc) · 725 Bytes
/
run_tests
File metadata and controls
executable file
·31 lines (27 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env node
"use strict";
try {
var reporter = require('nodeunit').reporters.default;
}
catch(e) {
console.log("Error: " + e.message);
console.log("");
console.log("Cannot find nodeunit module.");
console.log("Please run the following:");
console.log("");
console.log(" npm install");
console.log("");
process.exit();
}
process.chdir(__dirname);
if (process.argv[2]) {
console.log("Running tests: ", process.argv.slice(2));
reporter.run(process.argv.slice(2), undefined, function (err) {
process.exit(((err) ? 1 : 0));
});
}
else {
reporter.run(['tests', 'tests/plugins'], undefined, function (err) {
process.exit(((err) ? 1 : 0));
});
}