@@ -69,7 +69,7 @@ export function createOrUpdateFileNode(
69
69
tasks : [ ] ,
70
70
typecheck : ! ! file . meta && 'typecheck' in file . meta ,
71
71
indent : 0 ,
72
- duration : file . result ?. duration ,
72
+ duration : file . result ?. duration != null ? Math . round ( file . result ?. duration ) : undefined ,
73
73
filepath : file . filepath ,
74
74
projectName : file . projectName || '' ,
75
75
projectNameColor : getProjectNameColor ( file . projectName ) ,
@@ -132,6 +132,9 @@ export function createOrUpdateNode(
132
132
) {
133
133
const node = explorerTree . nodes . get ( parentId ) as ParentTreeNode | undefined
134
134
let taskNode : UITaskTreeNode | undefined
135
+ const duration = task . result ?. duration != null
136
+ ? Math . round ( task . result ?. duration )
137
+ : undefined
135
138
if ( node ) {
136
139
taskNode = explorerTree . nodes . get ( task . id )
137
140
if ( taskNode ) {
@@ -141,7 +144,7 @@ export function createOrUpdateNode(
141
144
}
142
145
143
146
taskNode . mode = task . mode
144
- taskNode . duration = task . result ?. duration
147
+ taskNode . duration = duration
145
148
taskNode . state = task . result ?. state
146
149
}
147
150
else {
@@ -156,7 +159,7 @@ export function createOrUpdateNode(
156
159
expandable : false ,
157
160
expanded : false ,
158
161
indent : node . indent + 1 ,
159
- duration : task . result ?. duration ,
162
+ duration,
160
163
state : task . result ?. state ,
161
164
} as TestTreeNode | CustomTestTreeNode
162
165
}
@@ -174,7 +177,7 @@ export function createOrUpdateNode(
174
177
children : new Set ( ) ,
175
178
tasks : [ ] ,
176
179
indent : node . indent + 1 ,
177
- duration : task . result ?. duration ,
180
+ duration,
178
181
state : task . result ?. state ,
179
182
} as SuiteTreeNode
180
183
}
0 commit comments