From 0c954fafaeb96c7bb2161e9d18a3c75c5f551424 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(/^\/(.*)\/$/),