From 88bfacf895057c5fbfcd35a60a8b1675d193ebce Mon Sep 17 00:00:00 2001 From: Matt Rayner Date: Tue, 12 May 2020 20:50:55 +0100 Subject: [PATCH] updated regex to fix #2 --- .vscode/settings.json | 7 ------- package.json | 2 +- src/index.ts | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bf8bc70..1c21015 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,15 +1,8 @@ { "editor.rulers": [120], - "eslint.autoFixOnSave": true, "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", - "eslint.validate": [ - "javascript", - "javascriptreact", - { "language": "typescript", "autoFix": true }, - { "language": "typescriptreact", "autoFix": true } - ], "javascript.preferences.quoteStyle": "double", "typescript.preferences.quoteStyle": "double" } diff --git a/package.json b/package.json index 9d3cc9f..bbe153a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "k6-to-junit", - "version": "1.0.2", + "version": "1.0.3", "description": "tool to convert k6 output to junit xml", "main": "dist/index.js", "bin": "dist/command.js", diff --git a/src/index.ts b/src/index.ts index 5a07803..3a213c2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ export interface Threshold { const nameRegex = /script: (.*)$/m; export function parseLine(line: string): Threshold | null { - const threshold = /([✓|✗]) (.*?)\.*:/g.exec(line); + const threshold = /([✓|✗]) (.*?)\.+:/g.exec(line); if (threshold && threshold.length > 2) { return { systemOut: line,