Commit 87949a87 authored by Maciej Małecki's avatar Maciej Małecki Committed by Cédric de Saint Martin

[fix test] Make test runner exit after test exits

parent 0484197c
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
// //
var path = require('path'), var path = require('path'),
spawn = require('child_process').spawn,
httpProxy = require('../../'), httpProxy = require('../../'),
common = require('./common'); common = require('./common');
...@@ -50,7 +51,11 @@ var proxy = httpProxy.createServer(common.PORT, 'localhost'); ...@@ -50,7 +51,11 @@ var proxy = httpProxy.createServer(common.PORT, 'localhost');
proxy.listen(common.PROXY_PORT); proxy.listen(common.PROXY_PORT);
proxy.on('listening', function () { proxy.on('listening', function () {
require(path.join(process.cwd(), process.argv[2])); console.log('Proxy server listening on ' + common.PROXY_PORT);
var testProcess = spawn(process.argv[0], [ process.argv[2] ]);
testProcess.stdout.pipe(process.stdout);
testProcess.stderr.pipe(process.stderr);
testProcess.on('exit', process.exit);
}); });
// vim:filetype=javascript // vim:filetype=javascript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment