diff options
author | Jan Krems <jan.krems@groupon.com> | 2016-12-11 14:36:58 -0800 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-02-13 14:46:12 +0100 |
commit | 8c9762e150362c9b7f4db8e5c1680f1758f0ef9f (patch) | |
tree | 05b50a0014663acd3f1c0483eaf5d8013440c024 /deps/node-inspect/test/cli/backtrace.test.js | |
parent | b1fc7745f2c7f279d388d8c88781df776b740259 (diff) | |
download | android-node-v8-8c9762e150362c9b7f4db8e5c1680f1758f0ef9f.tar.gz android-node-v8-8c9762e150362c9b7f4db8e5c1680f1758f0ef9f.tar.bz2 android-node-v8-8c9762e150362c9b7f4db8e5c1680f1758f0ef9f.zip |
deps: add node-inspect 1.10.2
Squashed from:
- deps: Add node-inspect 1.10.1
This adds a reimplementation of the old CLI debugger (`node debug`)
against the new debugger protocol (`node --inspect`). This is necessary
because the old protocol won't be supported in future versions of V8.
- deps: Update node-inspect to 1.10.2
Starting with 1.10.2 the test suite should pass consistently on
windows.
- deps: Update to node-inspect 1.10.4
PR-URL: https://github.com/nodejs/node/pull/10187
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/node-inspect/test/cli/backtrace.test.js')
-rw-r--r-- | deps/node-inspect/test/cli/backtrace.test.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/deps/node-inspect/test/cli/backtrace.test.js b/deps/node-inspect/test/cli/backtrace.test.js new file mode 100644 index 0000000000..2e2ba4a342 --- /dev/null +++ b/deps/node-inspect/test/cli/backtrace.test.js @@ -0,0 +1,30 @@ +'use strict'; +const Path = require('path'); + +const { test } = require('tap'); + +const startCLI = require('./start-cli'); + +test('display and navigate backtrace', (t) => { + const script = Path.join('examples', 'backtrace.js'); + const cli = startCLI([script]); + + function onFatal(error) { + cli.quit(); + throw error; + } + + return cli.waitFor(/break/) + .then(() => cli.waitForPrompt()) + .then(() => cli.stepCommand('c')) + .then(() => cli.command('bt')) + .then(() => { + t.match(cli.output, `#0 topFn ${script}:8:2`); + }) + .then(() => cli.command('backtrace')) + .then(() => { + t.match(cli.output, `#0 topFn ${script}:8:2`); + }) + .then(() => cli.quit()) + .then(null, onFatal); +}); |