File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
test-result-summary-client/src/Build Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,19 @@ const Build = () => {
105
105
let testResult = [ ] ;
106
106
if ( builds [ 0 ] . tests !== undefined ) {
107
107
testResult = builds [ 0 ] . tests . map ( ( test ) => {
108
+ let duration = test . duration ;
109
+ if ( ! duration ) {
110
+ if ( ! test . startTime ) {
111
+ duration = null ;
112
+ } else {
113
+ duration = Infinity ;
114
+ }
115
+ }
108
116
const ret = {
109
117
key : test . _id ,
110
118
sortName : test . testName ,
111
119
testName : test . testName ,
112
- duration : test . duration ,
120
+ duration,
113
121
machine : builds [ 0 ] . machine ,
114
122
sortMachine : builds [ 0 ] . machine ,
115
123
buildName : buildData [ 0 ] . buildName ,
Original file line number Diff line number Diff line change 1
1
export default function renderDuration ( ms ) {
2
2
if ( ms === null ) {
3
3
return 'N/A' ;
4
+ } else if ( ms === Infinity ) {
5
+ return ms ;
4
6
}
5
7
const milliseconds = parseInt ( ms % 1000 , 10 ) ;
6
8
const seconds = parseInt ( ( ms / 1000 ) % 60 , 10 ) ;
You can’t perform that action at this time.
0 commit comments