From 9f91775e78de419bfd267816cff2c3be1b5689c7 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Tue, 28 Apr 2020 17:00:57 +0200 Subject: [PATCH] fix(unit tests): re add code removed by mistake in stringUtils tests --- test/api/unit/libs/stringUtils.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api/unit/libs/stringUtils.test.js b/test/api/unit/libs/stringUtils.test.js index 7183ecaecd..0596cd16b9 100644 --- a/test/api/unit/libs/stringUtils.test.js +++ b/test/api/unit/libs/stringUtils.test.js @@ -4,7 +4,7 @@ import bannedWords from '../../../../website/server/libs/bannedWords'; describe('stringUtils', () => { describe('getMatchesByWordArray', () => { it('check all banned words are matched', async () => { - const message = bannedWords.join(','); + const message = bannedWords.join(',').replace(/\\/g, ''); const matches = getMatchesByWordArray(message, bannedWords); expect(matches.length).to.equal(bannedWords.length); });