1 |
|
2 | let reporter;
|
3 | try {
|
4 | reporter = require('nodeunit').reporters.default;
|
5 | }
|
6 | catch(e) {
|
7 | console.log("Cannot find nodeunit module.");
|
8 | console.log("Make sure to run 'npm install nodeunit'");
|
9 | process.exit();
|
10 | }
|
11 |
|
12 | process.chdir(__dirname);
|
13 | reporter.run(['test/'], null, function(failure) {
|
14 | process.exit(failure ? 1 : 0)
|
15 | });
|