From d246b63a4671af548393f46612f51e33386419e5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 19 Dec 2017 12:36:07 +0100 Subject: [PATCH 1/2] test: handle both `ms` and `s` in test timings --- integration_tests/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/utils.js b/integration_tests/utils.js index ebab684b0ee0..accc16dcd884 100644 --- a/integration_tests/utils.js +++ b/integration_tests/utils.js @@ -148,7 +148,7 @@ const extractSummary = (stdout: string) => { const rest = cleanupStackTrace( // remove all timestamps - stdout.slice(0, -match[0].length).replace(/\s*\(.*ms\)/gm, ''), + stdout.slice(0, -match[0].length).replace(/\s*\(\d*\.?\d+m?s\)/gm, ''), ); return {rest, summary}; From 7a6ef518f108de51340d47f73dbc53687c1215d0 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 19 Dec 2017 12:53:39 +0100 Subject: [PATCH 2/2] test: add `$` to only match end of string --- integration_tests/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/utils.js b/integration_tests/utils.js index accc16dcd884..06454d81d817 100644 --- a/integration_tests/utils.js +++ b/integration_tests/utils.js @@ -148,7 +148,7 @@ const extractSummary = (stdout: string) => { const rest = cleanupStackTrace( // remove all timestamps - stdout.slice(0, -match[0].length).replace(/\s*\(\d*\.?\d+m?s\)/gm, ''), + stdout.slice(0, -match[0].length).replace(/\s*\(\d*\.?\d+m?s\)$/gm, ''), ); return {rest, summary};