A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nodejs/node/commit/7819bfec69 below:

deflake test-esm-loader-hooks-inspect-brk · nodejs/node@7819bfe · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+9

-12

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+9

-12

lines changed Original file line number Diff line number Diff line change

@@ -10,23 +10,20 @@ const assert = require('assert');

10 10

const fixtures = require('../common/fixtures');

11 11

const { NodeInstance } = require('../common/inspector-helper.js');

12 12 13 -

async function runIfWaitingForDebugger(session) {

14 -

const commands = [

15 -

{ 'method': 'Runtime.enable' },

16 -

{ 'method': 'Debugger.enable' },

17 -

{ 'method': 'Runtime.runIfWaitingForDebugger' },

18 -

];

19 - 20 -

await session.send(commands);

21 -

await session.waitForNotification('Debugger.paused');

22 -

}

23 - 24 13

async function runTest() {

25 14

const main = fixtures.path('es-module-loaders', 'register-loader.mjs');

26 15

const child = new NodeInstance(['--inspect-brk=0'], '', main);

27 16 28 17

const session = await child.connectInspectorSession();

29 -

await runIfWaitingForDebugger(session);

18 +

await session.send({ method: 'NodeRuntime.enable' });

19 +

await session.waitForNotification('NodeRuntime.waitingForDebugger');

20 +

await session.send([

21 +

{ 'method': 'Runtime.enable' },

22 +

{ 'method': 'Debugger.enable' },

23 +

{ 'method': 'Runtime.runIfWaitingForDebugger' },

24 +

]);

25 +

await session.send({ method: 'NodeRuntime.disable' });

26 +

await session.waitForNotification('Debugger.paused');

30 27

await session.runToCompletion();

31 28

assert.strictEqual((await child.expectShutdown()).exitCode, 0);

32 29

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4