forked from thetoke/navicon-transformicons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·23 lines (20 loc) · 749 Bytes
/
index.js
File metadata and controls
executable file
·23 lines (20 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module.exports = utest;
utest.Collection = require('./lib/Collection');
utest.TestCase = require('./lib/TestCase');
utest.BashReporter = require('./lib/reporter/BashReporter');
utest.ConsoleReporter = require('./lib/reporter/ConsoleReporter');
utest.Reporter = utest.BashReporter;
var collection;
var reporter;
function utest(name, tests) {
if (!collection) {
collection = new utest.Collection();
reporter = new utest.Reporter({collection: collection});
process.nextTick(collection.run.bind(collection));
collection.on('complete', function(stats) {
process.exit(stats.fail ? 1 : 0);
});
}
var testCase = new utest.TestCase({name: name, tests: tests});
collection.add(testCase);
};