Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/filter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('assert');
var Filter = require('../lib/badwords.js'),
let Filter = require('../lib/badwords.js'),
filter = new Filter(),
assert = require('better-assert');

Expand All @@ -20,12 +20,12 @@ describe('filter', function(){
});

it('Should replace a string with proper placeholder when overridden', function(){
var customFilter = new Filter({ placeHolder: 'x'});
let customFilter = new Filter({ placeHolder: 'x'});
assert(customFilter.clean('This is a hells good test') === 'This is a xxxxx good test');
});

it('Should allow an instance of filter with an empty blacklist', function() {
var customFilter = new Filter({
let customFilter = new Filter({
emptyList: true
});
assert(customFilter.clean('This is a hells good test') === 'This is a hells good test');
Expand All @@ -44,4 +44,4 @@ describe('filter', function(){
assert(filter.clean('hello there') === 'hello there');
});
});
});
});