Revert "Revert "fix(banned words): fix partial matching of words containing diacritic… (#12444)""

This reverts commit 5362058f35.
This commit is contained in:
Matteo Pagliazzi
2020-11-09 11:34:28 +01:00
parent 2e59260149
commit 174ac6d7e3
2 changed files with 15 additions and 1 deletions
+5
View File
@@ -8,5 +8,10 @@ describe('stringUtils', () => {
const matches = getMatchesByWordArray(message, bannedWords);
expect(matches.length).to.equal(bannedWords.length);
});
it('doesn\'t flag names with accented characters', () => {
const name = 'TESTPLACEHOLDERSWEARWORDHEREé';
const matches = getMatchesByWordArray(name, bannedWords);
expect(matches.length).to.equal(0);
});
});
});