<commit_before>var should = require('chai').should(),
    BadLanguageFilter = require('../index');

describe('test contains function', function() {
  it('should contain bad words', function() {
    var filter = new BadLanguageFilter();
	filter.contains("shit fuck").should.equal(true);
  });
  
  it('should not bad words', function() {    
	var filter = new BadLanguageFilter();
	filter.contains("no bad words").should.equal(false);
  });
});
<commit_msg>updated tests<commit_after>var should = require('chai').should(),
    BadLanguageFilter = require('../index');

describe('test contains function', function() {
  it('should contain bad words', function() {
    var filter = new BadLanguageFilter();
    filter.contains("shit fuck").should.equal(true);
  });

  it('should not bad words', function() {
    var filter = new BadLanguageFilter();
    filter.contains("no bad words").should.equal(false);
  });
});

describe('test matches function', function() {
  it('should return 2 matches', function() {
    var filter = new BadLanguageFilter();
    filter.matches("cock fuck ").length.should.equal(2);
  });

  it('should return 1 match', function() {
    var filter = new BadLanguageFilter();
    filter.matches("no bad fuck words").length.should.equal(1);
  });

  it('should return no match', function() {
    var filter = new BadLanguageFilter();
    (filter.matches("no bad words") === null).should.equal(true);
  });
});

describe('test removeWords function', function() {
  it('should return content without bad words', function() {
    var filter = new BadLanguageFilter();
    filter.removeWords("cock fuck ").length.should.equal(0);
  });

  it('should not updated any content', function() {
    var filter = new BadLanguageFilter();
    var originalString = "no bad words";
    filter.removeWords(originalString).should.equal(originalString);
  });
});

describe('test replaceWords function', function() {
  it('should return updated content without any bad words', function() {
    var filter = new BadLanguageFilter();
    filter.replaceWords("cock fuck ", "test ").should.equal("test test ");
  });

  it('should not updated any content', function() {
    var filter = new BadLanguageFilter();
    var originalString = "no bad words";
    filter.replaceWords(originalString, "test").should.equal(originalString);
  });
});


{'fraction_non_alphanumeric': 0.16047801963294922, 'fraction_numerical': 0.002134016218523261, 'mean_word_length': 4.400921658986175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 4, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2793849', 'n_tokens_mistral': 652, 'n_tokens_neox': 632, 'n_words': 180}