<commit_before>var assert = require('chai').assert;

var plugin = require('../');

describe('snarl-gif', function() {
  describe('#interpret()', function () {
    it('should exist as a function', function () {
      assert.equal(typeof plugin.gif, 'function');
    });
    it('should parse an input', function (done) {
      var input = {
        parsed: "hello world"
      };

      plugin.gif(input, function(err, msg) {
        assert.isNull(err);
        assert.isOk(msg)
        done(err);
      });
    });
  });
  describe('#chooseRandom()', function () {
    it('should exist as a function', function () {
      assert.equal(typeof plugin.chooseRandom, 'function');
    });
  });
});<commit_msg>added a test<commit_after>var assert = require('chai').assert;

var plugin = require('../');

describe('snarl-gif', function() {
  describe('#interpret()', function () {
    it('should exist as a function', function () {
      assert.equal(typeof plugin.gif, 'function');
    });
    it('should parse an input', function (done) {
      var input = {
        parsed: "hello world"
      };

      plugin.gif(input, function(err, msg) {
        assert.isNull(err);
        assert.isOk(msg)
        done(err);
      });
    });
  });
  describe('#chooseRandom()', function () {
    it('should exist as a function', function () {
      assert.equal(typeof plugin.chooseRandom, 'function');
    });
    it('should return an item in the array', function () {
      var arr = [1, 2, 3, 4];
      var item = plugin.chooseRandom(arr);
      assert.isTrue(arr.indexOf(item) > -1)
    });
  });
});
{'fraction_non_alphanumeric': 0.18101822752985544, 'fraction_numerical': 0.0031426775612822125, 'mean_word_length': 2.7370892018779345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1152800', 'n_tokens_mistral': 486, 'n_tokens_neox': 475, 'n_words': 115}