From 162e3400ffeb110d6912d33953e5f17e981d1b0d 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/46767 Reviewed-By: Tobias Nießen Reviewed-By: Yagiz Nizipli Reviewed-By: Richard Lau --- 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 9edeff22a84554..b5bc85d20618f1 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -724,6 +724,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 95fbda98402b14..103403af5da6ca 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 3", - "Untitled 4" + "Event constructors 3", + "Event constructors 4" ] } },