mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
f7b5eacaa6
PR-URL: https://github.com/nodejs/node/pull/29886 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
22 lines
665 B
JavaScript
22 lines
665 B
JavaScript
'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();
|