Fix mocha report fixture + test duration handling

This commit is contained in:
Michal Dorner 2021-02-24 21:32:51 +01:00
parent 9b675bd55f
commit 8dba8714d0
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
6 changed files with 20 additions and 87 deletions

View file

@ -71,7 +71,7 @@ export class MochaJsonParser implements TestParser {
}
const error = this.getTestCaseError(test)
const testCase = new TestCaseResult(test.title, result, test.duration, error)
const testCase = new TestCaseResult(test.title, result, test.duration ?? 0, error)
group.tests.push(testCase)
}

View file

@ -13,7 +13,7 @@ export interface MochaJsonTest {
title: string
fullTitle: string
file: string
duration: number
duration?: number
err: MochaJsonTestError
}