mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(unit tests): re add code removed by mistake in stringUtils tests
This commit is contained in:
@@ -4,7 +4,7 @@ import bannedWords from '../../../../website/server/libs/bannedWords';
|
|||||||
describe('stringUtils', () => {
|
describe('stringUtils', () => {
|
||||||
describe('getMatchesByWordArray', () => {
|
describe('getMatchesByWordArray', () => {
|
||||||
it('check all banned words are matched', async () => {
|
it('check all banned words are matched', async () => {
|
||||||
const message = bannedWords.join(',');
|
const message = bannedWords.join(',').replace(/\\/g, '');
|
||||||
const matches = getMatchesByWordArray(message, bannedWords);
|
const matches = getMatchesByWordArray(message, bannedWords);
|
||||||
expect(matches.length).to.equal(bannedWords.length);
|
expect(matches.length).to.equal(bannedWords.length);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user