From 57101b80bf770efb04d91e0f7190360f44a0b321 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 10 Mar 2020 02:28:10 +0100 Subject: [PATCH] cypress tests will really pass --- backend/src/schema/resolvers/searches.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/schema/resolvers/searches.js b/backend/src/schema/resolvers/searches.js index 7f11734a3..56913fb3e 100644 --- a/backend/src/schema/resolvers/searches.js +++ b/backend/src/schema/resolvers/searches.js @@ -95,10 +95,11 @@ const createPostQuery = str => { } // start globbing ... escapedString.split(' ').forEach(s => { - if (!s.matches(/^(AND|OR|NOT)$/)) + if (!s.match(/^(AND|OR|NOT)$/i)) { // at least 4 letters. So AND, OR and NOT are never used unquoted // but the related cypress test expects a search for just two chars. result += ' OR ' + s + '*' + } }) // now we could become fuzzy using ~ return result