-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
50 lines (45 loc) · 1.06 KB
/
test.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
'use strict';
/**
* Run package tests.
* (C) 2013 TuiInnovation.
*/
// requires
var testing = require('testing');
process.setMaxListeners(0);
/**
* Run all module tests.
*/
exports.test = function(callback) {
var tests = {};
var files = {};
files.lib = [ 'app',
'db' ];
files['lib/io'] = [ 'ajax',
'parametrized-string',
'xml-reader',
'json-formatter',
'json-reader' ];
files['lib/services'] = ['at-ticket-avail',
'fs-venue-search',
'at-read-ticket-names',
'at-hotel-list',
'at-hotel-detail',
'ms-hotel-list',
'yp-search',
'ms-venues'];
files['lib/util'] = [ 'core' ];
files['lib/batch'] = ['ticket-avail-parser',
'hotel-parser'];
for (var path in files) {
for (var i=0; i<files[path].length; i++) {
var file = files[path][i];
tests[path + '/' + file] = require('./' + path + '/' + file + '.js').test;
}
}
testing.run(tests, 100000, callback);
};
// run tests if invoked directly
if (__filename == process.argv[1])
{
exports.test(testing.show);
}