mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[test] Run tests in test/core/simple by default
This commit is contained in:
parent
e109eba972
commit
68cebbe0e7
@ -25,7 +25,8 @@
|
||||
|
||||
*/
|
||||
|
||||
var path = require('path'),
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
spawn = require('child_process').spawn,
|
||||
async = require('async'),
|
||||
colors = require('colors');
|
||||
@ -56,6 +57,17 @@ function runTest(test, callback) {
|
||||
};
|
||||
|
||||
var tests = process.argv.slice(2);
|
||||
|
||||
if (!tests.length) {
|
||||
var pathPrefix = path.join(__dirname, 'simple');
|
||||
tests = fs.readdirSync(pathPrefix).map(function (test) {
|
||||
return path.join(pathPrefix, test);
|
||||
});
|
||||
//
|
||||
// We only run simple tests by default.
|
||||
//
|
||||
}
|
||||
|
||||
async.forEachSeries(tests, runTest, function () {
|
||||
var failed = [], ok = [];
|
||||
for (var test in results) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user