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/profile.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/profile.test.js')
-rw-r--r-- | deps/node-inspect/test/cli/profile.test.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/deps/node-inspect/test/cli/profile.test.js b/deps/node-inspect/test/cli/profile.test.js new file mode 100644 index 0000000000..3ef1896200 --- /dev/null +++ b/deps/node-inspect/test/cli/profile.test.js @@ -0,0 +1,32 @@ +'use strict'; +const { test } = require('tap'); + +const startCLI = require('./start-cli'); + +function delay(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +test('profiles', (t) => { + const cli = startCLI(['examples/empty.js']); + + function onFatal(error) { + cli.quit(); + throw error; + } + + return cli.waitFor(/break/) + .then(() => cli.waitForPrompt()) + .then(() => cli.command('exec console.profile()')) + .then(() => { + t.match(cli.output, 'undefined'); + }) + .then(() => cli.command('exec console.profileEnd()')) + .then(() => delay(250)) + .then(() => { + t.match(cli.output, 'undefined'); + t.match(cli.output, 'Captured new CPU profile.'); + }) + .then(() => cli.quit()) + .then(null, onFatal); +}); |