diff options
Diffstat (limited to 'test/parallel/test-inspector-break-e.js')
-rw-r--r-- | test/parallel/test-inspector-break-e.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/parallel/test-inspector-break-e.js b/test/parallel/test-inspector-break-e.js new file mode 100644 index 0000000000..274422cf59 --- /dev/null +++ b/test/parallel/test-inspector-break-e.js @@ -0,0 +1,21 @@ +'use strict'; +const common = require('../common'); +common.skipIfInspectorDisabled(); + +const assert = require('assert'); +const { NodeInstance } = require('../common/inspector-helper.js'); + +async function runTests() { + const instance = new NodeInstance(undefined, 'console.log(10)'); + const session = await instance.connectInspectorSession(); + await session.send([ + { 'method': 'Runtime.enable' }, + { 'method': 'Debugger.enable' }, + { 'method': 'Runtime.runIfWaitingForDebugger' }, + ]); + await session.waitForBreakOnLine(0, '[eval]'); + await session.runToCompletion(); + assert.strictEqual((await instance.expectShutdown()).exitCode, 0); +} + +runTests().then(common.mustCall()); |