forked from haraka/Haraka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests
executable file
·37 lines (33 loc) · 838 Bytes
/
run_tests
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
32
33
34
35
36
37
#!/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/cfreader',
'tests/plugins',
'tests/plugins/auth',
'tests/plugins/queue'
], undefined, function (err) {
process.exit(((err) ? 1 : 0));
});
}