11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_cicommon.skipIfInspectorDisabled(); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst assert = require('assert'); 61cb0ef41Sopenharmony_ciconst { NodeInstance } = require('../common/inspector-helper.js'); 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciasync function runTests() { 91cb0ef41Sopenharmony_ci const instance = new NodeInstance(undefined, 'console.log(10)'); 101cb0ef41Sopenharmony_ci const session = await instance.connectInspectorSession(); 111cb0ef41Sopenharmony_ci await session.send([ 121cb0ef41Sopenharmony_ci { 'method': 'Runtime.enable' }, 131cb0ef41Sopenharmony_ci { 'method': 'Debugger.enable' }, 141cb0ef41Sopenharmony_ci { 'method': 'Runtime.runIfWaitingForDebugger' }, 151cb0ef41Sopenharmony_ci ]); 161cb0ef41Sopenharmony_ci await session.waitForBreakOnLine(0, '[eval]'); 171cb0ef41Sopenharmony_ci await session.runToCompletion(); 181cb0ef41Sopenharmony_ci assert.strictEqual((await instance.expectShutdown()).exitCode, 0); 191cb0ef41Sopenharmony_ci} 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_cirunTests().then(common.mustCall()); 22