From c6b4e9604fdbe5993d335686a17b577b8193dc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 25 Feb 2022 08:56:33 +0100 Subject: [PATCH] test: adapt test-worker-debug for V8 10.0 V8 is removing callFrame.url. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3345001 PR-URL: https://github.com/nodejs/node/pull/42657 Reviewed-By: Darshan Sen Reviewed-By: Richard Lau Reviewed-By: Jiawen Geng Reviewed-By: Michael Dawson --- test/parallel/test-worker-debug.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/parallel/test-worker-debug.js b/test/parallel/test-worker-debug.js index 758d7acfc3a99f..da8e26b39ca453 100644 --- a/test/parallel/test-worker-debug.js +++ b/test/parallel/test-worker-debug.js @@ -6,7 +6,6 @@ common.skipIfInspectorDisabled(); const assert = require('assert'); const EventEmitter = require('events'); const { Session } = require('inspector'); -const { pathToFileURL } = require('url'); const { Worker, isMainThread, parentPort, workerData } = require('worker_threads'); @@ -106,7 +105,6 @@ class WorkerSession extends EventEmitter { this.post(command); const notification = await notificationPromise; const callFrame = notification.params.callFrames[0]; - assert.strictEqual(callFrame.url, pathToFileURL(script).toString()); assert.strictEqual(callFrame.location.lineNumber, line); } @@ -153,7 +151,7 @@ async function testBasicWorkerDebug(session, post) { await workerSession.waitForBreakAfterCommand( 'Runtime.runIfWaitingForDebugger', __filename, 1); await workerSession.waitForBreakAfterCommand( - 'Debugger.resume', __filename, 26); // V8 line number is zero-based + 'Debugger.resume', __filename, 25); // V8 line number is zero-based const msg = await consolePromise; assert.strictEqual(msg, workerMessage); workerSession.post('Debugger.resume');