From 0d1485b92423d9b4d2bce151aaca4f2995fa1b90 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 22 Feb 2023 17:40:43 +0100 Subject: [PATCH] test: fix default WPT titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/46778 Backport-PR-URL: https://github.com/nodejs/node/pull/46768 Reviewed-By: Tobias Nießen Reviewed-By: Yagiz Nizipli --- test/common/wpt.js | 3 +++ test/wpt/status/dom/events.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/common/wpt.js b/test/common/wpt.js index 950e0ecd135bcd..fdaacea0720f26 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -722,6 +722,9 @@ class WPTRunner { resultCallback(filename, test, reportResult) { const status = this.getTestStatus(test.status); const title = this.getTestTitle(filename); + if (/^Untitled( \d+)?$/.test(test.name)) { + test.name = `${title}${test.name.slice(8)}`; + } console.log(`---- ${title} ----`); if (status !== kPass) { this.fail(filename, test, status, reportResult); diff --git a/test/wpt/status/dom/events.json b/test/wpt/status/dom/events.json index 012b73f70001ae..372de5e5273315 100644 --- a/test/wpt/status/dom/events.json +++ b/test/wpt/status/dom/events.json @@ -19,8 +19,8 @@ "Event-constructors.any.js": { "fail": { "expected": [ - "Untitled 2", - "Untitled 3" + "Event constructors 2", + "Event constructors 3" ] } },