mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
9e21711c60
commit
85d83c2cdb
1 file changed
+4
-3
+4
-3
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user