Skip to content

Commit 93c23e7

Browse files
lpincatargos
authored andcommitted
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 65c376a commit 93c23e7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy