Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class ReportResult {
class WPTReport {
constructor(path) {
this.filename = `report-${path.replaceAll('/', '-')}.json`;
// Resolve at construction time so cwd changes (e.g. tmpdir cleanup) don't affect the output path.
this.filepath = path.resolve('out', 'wpt', this.filename);
/** @type {Map<string, ReportResult>} */
this.results = new Map();
this.time_start = Date.now();
Expand Down Expand Up @@ -139,7 +141,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,
Expand Down
Loading