mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Fixes #83
This regex change should match the dotnet format with or without milliseconds
This commit is contained in:
parent
51956bab1c
commit
c0e7f7f7dc
1 changed files with 1 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
export function parseNetDuration(str: string): number {
|
export function parseNetDuration(str: string): number {
|
||||||
// matches dotnet duration: 00:00:00.0010000
|
// matches dotnet duration: 00:00:00.0010000
|
||||||
const durationRe = /^(\d\d):(\d\d):(\d\d\.\d+)$/
|
const durationRe = /^(\d\d):(\d\d):(\d\d($|\.\d+$))/
|
||||||
const durationMatch = str.match(durationRe)
|
const durationMatch = str.match(durationRe)
|
||||||
if (durationMatch === null) {
|
if (durationMatch === null) {
|
||||||
throw new Error(`Invalid format: "${str}" is not NET duration`)
|
throw new Error(`Invalid format: "${str}" is not NET duration`)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue