test: ensure WPT report is in out/wpt

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62637
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
Filip Skokan authored and Antoine du Hamel committed 2026-05-07 15:41:36 +02:00
1 parent 9e21711c60
commit 85d83c2cdb
1 file changed
+4 -3
+4 -3
View File
@@ -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<string, ReportResult>} */
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,