mirror of
https://github.com/DeNNiiInc/Connect-5.git
synced 2026-04-18 11:46:01 +00:00
Add complete multiplayer system with real-time gameplay, challenge system, and 50x50 board option
This commit is contained in:
28
node_modules/bad-words/test/addWords.js
generated
vendored
Normal file
28
node_modules/bad-words/test/addWords.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
require('assert');
|
||||
var Filter = require('../lib/badwords.js'),
|
||||
filter = new Filter(),
|
||||
assert = require('better-assert');
|
||||
|
||||
describe('filter', function(){
|
||||
describe('addWords',function(){
|
||||
it('Should append words to the filter list.', function(){
|
||||
filter.addWords('dog', 'go');
|
||||
assert(filter.clean('Go dog go') === '** *** **');
|
||||
});
|
||||
|
||||
it('Should append words to the filter using an array', () => {
|
||||
let addWords = ['go', 'dog'];
|
||||
filter = new Filter()
|
||||
filter.addWords(...addWords);
|
||||
assert(filter.clean('Go dog go') === '** *** **');
|
||||
});
|
||||
|
||||
it('Should allow a list to be passed to the constructor', function() {
|
||||
filter = new Filter({
|
||||
list: ['dog']
|
||||
});
|
||||
|
||||
assert(filter.clean('Go dog go') === 'Go *** go');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user