summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-01-31 03:29:30 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-02-02 05:45:05 +0800
commitfa5e09753055edfe0e9a0f700dfcb4f356ac3c9d (patch)
tree9bca96daf093b2bd96791b794efd9197b5c29cca /test/sequential
parent154efc9bdef3ba8df5d3dfe3b32102baf3ac4311 (diff)
downloadandroid-node-v8-fa5e09753055edfe0e9a0f700dfcb4f356ac3c9d.tar.gz
android-node-v8-fa5e09753055edfe0e9a0f700dfcb4f356ac3c9d.tar.bz2
android-node-v8-fa5e09753055edfe0e9a0f700dfcb4f356ac3c9d.zip
process: move DEP0062 (node --debug) to end-of-life
This has already been practically end-of-life since `node --debug` alone would exit the process. This patch drops support of `node --inspect --debug-brk` as well. `node --inspect --debug-brk` has been deprecated since v8, it has been maintained so that vendors can target Node.js v6 and above without detecting versions. The support of `--inspect`, which starts from v6, will reach end-of-life in April 2019, it should be safe to drop the support of `--inspect --debug-brk` altogether in v12. Also removes `process._deprecatedDebugBrk` PR-URL: https://github.com/nodejs/node/pull/25828 Refs: https://github.com/nodejs/node/pull/12949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-debugger-debug-brk.js27
1 files changed, 7 insertions, 20 deletions
diff --git a/test/sequential/test-debugger-debug-brk.js b/test/sequential/test-debugger-debug-brk.js
index 086ee2788d..7a13572a06 100644
--- a/test/sequential/test-debugger-debug-brk.js
+++ b/test/sequential/test-debugger-debug-brk.js
@@ -2,32 +2,19 @@
const common = require('../common');
common.skipIfInspectorDisabled();
-// This test ensures that the debug-brk flag will spin up a new process and
-// wait, rather than exit.
-
+// This test ensures that the --debug-brk flag will exit the process
const assert = require('assert');
const fixtures = require('../common/fixtures');
-const spawn = require('child_process').spawn;
+const { spawnSync } = require('child_process');
-// file name here doesn't actually matter since
-// debugger will connect regardless of file name arg
+// File name here doesn't actually matter the process will exit on start.
const script = fixtures.path('empty.js');
function test(arg) {
- const child = spawn(process.execPath, ['--inspect', arg, script]);
- const argStr = child.spawnargs.join(' ');
- const fail = () => assert.fail(true, false, `'${argStr}' should not quit`);
- child.on('exit', fail);
-
- // give node time to start up the debugger
- setTimeout(function() {
- child.removeListener('exit', fail);
- child.kill();
- }, 2000);
-
- process.on('exit', function() {
- assert(child.killed);
- });
+ const child = spawnSync(process.execPath, ['--inspect', arg, script]);
+ const stderr = child.stderr.toString();
+ assert(stderr.includes('DEP0062'));
+ assert.strictEqual(child.status, 9);
}
test('--debug-brk');