From f411c2c78ecf177b794d17461f34057633993b20 Mon Sep 17 00:00:00 2001 From: inoway46 Date: Wed, 9 Sep 2026 20:21:17 +0900 Subject: [PATCH] test: fix flaky common WPT inspector test Wait for the WPT child to reach its startup wait before sending Runtime.runIfWaitingForDebugger. Signed-off-by: inoway46 Assisted-by: Codex --- test/parallel/test-common-wpt-inspect.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-common-wpt-inspect.js b/test/parallel/test-common-wpt-inspect.js index ff53902972c5..e614a4cfaa2c 100644 --- a/test/parallel/test-common-wpt-inspect.js +++ b/test/parallel/test-common-wpt-inspect.js @@ -23,11 +23,14 @@ async function main() { parent.on('stderr', (line) => stderr.push(line)); const session = await parent.connectInspectorSession(); + await session.send({ method: 'NodeRuntime.enable' }); + await session.waitForNotification('NodeRuntime.waitingForDebugger'); await session.send([ { method: 'Runtime.enable' }, { method: 'Debugger.enable' }, { method: 'Runtime.runIfWaitingForDebugger' }, ]); + await session.send({ method: 'NodeRuntime.disable' }); await session.waitForNotification('Debugger.paused'); await session.send({ method: 'Debugger.resume' }); await session.disconnect();