mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
e7ff00d0c5
Reworked rebase of PR #17360 with feedback PR-URL: https://github.com/nodejs/node/pull/18194 Fixes: https://github.com/nodejs/node/issues/17340 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
25 lines
731 B
JavaScript
25 lines
731 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
common.crashOnUnhandledRejection();
|
|
|
|
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(0, (await instance.expectShutdown()).exitCode);
|
|
}
|
|
|
|
runTests();
|