mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-19 20:34:44 +00:00
12 lines
500 B
JavaScript
12 lines
500 B
JavaScript
import { getMatchesByWordArray } from '../../../../website/server/libs/stringUtils';
|
|
import bannedWords from '../../../../website/server/libs/bannedWords';
|
|
|
|
describe('stringUtils', () => {
|
|
describe('getMatchesByWordArray', () => {
|
|
it('check all banned words are matched', async () => {
|
|
const message = bannedWords.join(',').replace(/\\/g, '');
|
|
const matches = getMatchesByWordArray(message, bannedWords);
|
|
expect(matches.length).to.equal(bannedWords.length);
|
|
});
|
|
});
|
|
});
|