mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
#83 - Use non-capturing optional group, add tests and update dist
This commit is contained in:
parent
c0e7f7f7dc
commit
3a0bb833dc
4 changed files with 40 additions and 5 deletions
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
|
|
@ -1799,8 +1799,7 @@ exports.formatTime = formatTime;
|
|||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.parseIsoDate = exports.parseNetDuration = void 0;
|
||||
function parseNetDuration(str) {
|
||||
// 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`);
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue