From db9bb186f5270dab3fba8683748ce3ca0b546318 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 27 May 2016 11:41:00 +0200 Subject: [PATCH] =?UTF-8?q?fix=20#342=20set=20child=20process=20debug=20po?= =?UTF-8?q?rt=20to=20available=20=E2=80=94=20add=20integration=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/api.js | 15 +++++++++++++++ test/fixture/debug-arg.js | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 test/fixture/debug-arg.js diff --git a/test/api.js b/test/api.js index b9e84da3d..48025191f 100644 --- a/test/api.js +++ b/test/api.js @@ -1037,5 +1037,20 @@ function generatePassDebugTests(execArgv) { }); } +function generatePassDebugIntegrationTests(execArgv) { + test('pass ' + execArgv.join(' ') + ' to fork', function (t) { + t.plan(1); + + var api = new Api({testOnlyExecArgv: execArgv}); + return api.run([path.join(__dirname, 'fixture/debug-arg.js')]) + .then(function (result) { + t.is(result.passCount, 1); + }); + }); +} + generatePassDebugTests(['--debug=0']); generatePassDebugTests(['--debug']); + +generatePassDebugIntegrationTests(['--debug=0']); + diff --git a/test/fixture/debug-arg.js b/test/fixture/debug-arg.js new file mode 100644 index 000000000..cbee6f5ab --- /dev/null +++ b/test/fixture/debug-arg.js @@ -0,0 +1,5 @@ +import test from '../../'; + +test(t => { + t.true(process.execArgv[0].indexOf('--debug') === 0); +});