From 3c3322173c35a77e3a862c1113f6304282664751 Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Sat, 11 Nov 2017 11:26:41 -0500 Subject: [PATCH] Allow to specify empty bearings string in input parameters --- features/support/data_classes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/support/data_classes.js b/features/support/data_classes.js index 5aced6c3b..a383540d6 100644 --- a/features/support/data_classes.js +++ b/features/support/data_classes.js @@ -12,6 +12,10 @@ module.exports = { FuzzyMatch: class { match (got, want) { + // don't fail if bearings input and extected string is empty and actual result is undefined + if (want === '' && (got === '' || got === undefined)) + return true; + var matchPercent = want.match(/(.*)\s+~(.+)%$/), matchAbs = want.match(/(.*)\s+\+\-(.+)$/), matchRe = want.match(/^\/(.*)\/$/),