Skip to content

Commit 3c5ceff

Browse files
authored
test: deflake test-inspector-strip-types
Use the `NodeRuntime.waitingForDebugger` event. Refs: #51560 PR-URL: #55058 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent ffe0dc5 commit 3c5ceff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/parallel/test-inspector-strip-types.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ async function runTest() {
1818

1919
const session = await child.connectInspectorSession();
2020

21-
const commands = [
21+
await session.send({ method: 'NodeRuntime.enable' });
22+
await session.waitForNotification('NodeRuntime.waitingForDebugger');
23+
await session.send([
2224
{ 'method': 'Debugger.enable' },
2325
{ 'method': 'Runtime.enable' },
2426
{ 'method': 'Runtime.runIfWaitingForDebugger' },
25-
];
26-
27-
await session.send(commands);
27+
]);
28+
await session.send({ method: 'NodeRuntime.disable' });
2829

2930
const scriptParsed = await session.waitForNotification((notification) => {
3031
if (notification.method !== 'Debugger.scriptParsed') return false;

0 commit comments

Comments
 (0)