Skip to content

Commit

Permalink
test: deflake test-inspector-strip-types
Browse files Browse the repository at this point in the history
Use the `NodeRuntime.waitingForDebugger` event.

Refs: #51560
  • Loading branch information
lpinca committed Sep 22, 2024
1 parent 65362f0 commit d1f4a31
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/parallel/test-inspector-strip-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d1f4a31

Please sign in to comment.