2018-01-16 23:35:54 +01:00
|
|
|
// Flags: --expose-internals
|
2017-08-02 00:28:51 +02:00
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
|
|
|
|
const assert = require('assert');
|
2017-10-14 04:42:38 +02:00
|
|
|
const { NodeInstance } = require('../common/inspector-helper.js');
|
2017-08-02 00:28:51 +02:00
|
|
|
|
|
|
|
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' }
|
|
|
|
]);
|
2019-01-30 23:13:45 +01:00
|
|
|
await session.waitForBreakOnLine(0, '[eval]');
|
2017-08-02 00:28:51 +02:00
|
|
|
await session.runToCompletion();
|
2018-10-12 20:10:26 +02:00
|
|
|
assert.strictEqual((await instance.expectShutdown()).exitCode, 0);
|
2017-08-02 00:28:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
runTests();
|