diff --git a/test/parallel/test-inspector-strip-types.js b/test/parallel/test-inspector-strip-types.js index 68e2463d530e8f..c03a58345e59f9 100644 --- a/test/parallel/test-inspector-strip-types.js +++ b/test/parallel/test-inspector-strip-types.js @@ -18,13 +18,14 @@ async function runTest() { const session = await child.connectInspectorSession(); - const commands = [ + await session.send({ method: 'NodeRuntime.enable' }); + await session.waitForNotification('NodeRuntime.waitingForDebugger'); + await session.send([ { 'method': 'Debugger.enable' }, { 'method': 'Runtime.enable' }, { 'method': 'Runtime.runIfWaitingForDebugger' }, - ]; - - await session.send(commands); + ]); + await session.send({ method: 'NodeRuntime.disable' }); const scriptParsed = await session.waitForNotification((notification) => { if (notification.method !== 'Debugger.scriptParsed') return false;