test: fix inspector tests after V8 upgrade
V8 improved break locations for the node --inspect-brk -e case. PR-URL: https://github.com/nodejs/node/pull/21983 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
parent
e6cdf24bb5
commit
19984ad7bb
@ -14,7 +14,7 @@ setTimeout(() => {
|
||||
`;
|
||||
|
||||
async function skipBreakpointAtStart(session) {
|
||||
await session.waitForBreakOnLine(0, '[eval]');
|
||||
await session.waitForBreakOnLine(3, '[eval]');
|
||||
await session.send({ 'method': 'Debugger.resume' });
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ async function runTests() {
|
||||
{ 'method': 'Runtime.runIfWaitingForDebugger' }
|
||||
]);
|
||||
|
||||
await session.waitForBreakOnLine(0, '[eval]');
|
||||
await session.waitForBreakOnLine(2, '[eval]');
|
||||
await session.send({ 'method': 'Debugger.resume' });
|
||||
|
||||
console.error('[test] Waiting for break1');
|
||||
|
@ -10,7 +10,7 @@ const script = 'setInterval(() => { debugger; }, 50);';
|
||||
|
||||
async function skipFirstBreakpoint(session) {
|
||||
console.log('[test]', 'Skipping the first breakpoint in the eval script');
|
||||
await session.waitForBreakOnLine(0, '[eval]');
|
||||
await session.waitForBreakOnLine(2, '[eval]');
|
||||
await session.send({ 'method': 'Debugger.resume' });
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Flags: --expose-internals
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
common.skipIfInspectorDisabled();
|
||||
|
||||
const assert = require('assert');
|
||||
@ -15,7 +14,7 @@ async function runTests() {
|
||||
{ 'method': 'Debugger.enable' },
|
||||
{ 'method': 'Runtime.runIfWaitingForDebugger' }
|
||||
]);
|
||||
await session.waitForBreakOnLine(0, '[eval]');
|
||||
await session.waitForBreakOnLine(2, '[eval]');
|
||||
await session.runToCompletion();
|
||||
assert.strictEqual(0, (await instance.expectShutdown()).exitCode);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ async function testBreakpointOnStart(session) {
|
||||
];
|
||||
|
||||
await session.send(commands);
|
||||
await session.waitForBreakOnLine(0, script);
|
||||
await session.waitForBreakOnLine(21, script);
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ async function runTests() {
|
||||
{ 'method': 'Debugger.enable' },
|
||||
{ 'method': 'Runtime.runIfWaitingForDebugger' }
|
||||
]);
|
||||
await session.waitForBreakOnLine(0, '[eval]');
|
||||
await session.waitForBreakOnLine(4, '[eval]');
|
||||
|
||||
await session.send({ 'method': 'Runtime.enable' });
|
||||
await getContext(session);
|
||||
|
Loading…
x
Reference in New Issue
Block a user