From 85d83c2cdbd18cc80adfe08035e3f29c0c837ae8 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Fri, 10 Apr 2026 14:06:18 +0200 Subject: [PATCH] test: ensure WPT report is in out/wpt Signed-off-by: Filip Skokan PR-URL: https://github.com/nodejs/node/pull/62637 Reviewed-By: Jason Zhang Reviewed-By: Mattias Buelens Reviewed-By: Luigi Pinca Reviewed-By: Aviv Keller --- test/common/wpt.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/common/wpt.js b/test/common/wpt.js index abf1f291071..69c1799babb 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -93,8 +93,9 @@ class ReportResult { // Checkout https://github.com/web-platform-tests/wpt.fyi/tree/main/api#results-creation // for more details. class WPTReport { - constructor(path) { - this.filename = `report-${path.replaceAll('/', '-')}.json`; + constructor(testPath) { + this.filename = `report-${testPath.replaceAll('/', '-')}.json`; + this.filepath = path.join(__dirname, `../../out/wpt/${this.filename}`); /** @type {Map} */ this.results = new Map(); this.time_start = Date.now(); @@ -139,7 +140,7 @@ class WPTReport { os: getOs(), }; - fs.writeFileSync(`out/wpt/${this.filename}`, JSON.stringify({ + fs.writeFileSync(this.filepath, JSON.stringify({ time_start: this.time_start, time_end: this.time_end, run_info: this.run_info,