Allow to specify empty bearings string in input parameters
This commit is contained in:
parent
e805f85407
commit
3c3322173c
@ -12,6 +12,10 @@ module.exports = {
|
|||||||
|
|
||||||
FuzzyMatch: class {
|
FuzzyMatch: class {
|
||||||
match (got, want) {
|
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+~(.+)%$/),
|
var matchPercent = want.match(/(.*)\s+~(.+)%$/),
|
||||||
matchAbs = want.match(/(.*)\s+\+\-(.+)$/),
|
matchAbs = want.match(/(.*)\s+\+\-(.+)$/),
|
||||||
matchRe = want.match(/^\/(.*)\/$/),
|
matchRe = want.match(/^\/(.*)\/$/),
|
||||||
|
Loading…
Reference in New Issue
Block a user