forked from mu-serverless/loadtest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
36 lines (29 loc) · 648 Bytes
/
test.js
File metadata and controls
36 lines (29 loc) · 648 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
32
33
34
35
'use strict';
/**
* Run package tests.
* (C) 2013 Alex Fernández.
*/
// requires
const testing = require('testing');
const Log = require('log');
// globals
const log = new Log('info');
/**
* Run all module tests.
*/
exports.test = function(callback)
{
log.debug('Running tests');
const tests = {};
const libs = ['hrtimer', 'latency', 'integration', 'loadtest', 'headers', 'testserver', 'websocket', 'httpClient'];
libs.forEach(function(lib)
{
tests[lib] = require('./lib/' + lib + '.js').test;
});
testing.run(tests, 4200, callback);
};
// run tests if invoked directly
if (__filename == process.argv[1])
{
exports.test();
}