Skip to content

Commit

Permalink
Fixes #83
Browse files Browse the repository at this point in the history
This regex change should match the dotnet format with or without milliseconds
  • Loading branch information
Shannon Deminick authored and GitHub committed Mar 23, 2021
1 parent 51956ba commit c0e7f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/parse-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function parseNetDuration(str: string): number {
// 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)
if (durationMatch === null) {
throw new Error(`Invalid format: "${str}" is not NET duration`)
Expand Down

0 comments on commit c0e7f7f

Please sign in to comment.