Skip to content

Commit 6ed8fbf

Browse files
panvatargos
authored andcommitted
test: add WPT report test duration
PR-URL: #50574 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 4cbe44e commit 6ed8fbf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/common/wpt.js

+4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,13 @@ function codeUnitStr(char) {
5959
}
6060

6161
class ReportResult {
62+
#startTime;
63+
6264
constructor(name) {
6365
this.test = name;
6466
this.status = 'OK';
6567
this.subtests = [];
68+
this.#startTime = Date.now();
6669
}
6770

6871
addSubtest(name, status, message) {
@@ -81,6 +84,7 @@ class ReportResult {
8184

8285
finish(status) {
8386
this.status = status ?? 'OK';
87+
this.duration = Date.now() - this.#startTime;
8488
}
8589
}
8690

0 commit comments

Comments
 (0)