<commit_before>var Comments = require('./comments.js');
var config = require('./config.json');
var event = require('./test_event.json');
var comments = new Comments(config);

comments.submit(event)
.then(function(url) {
  console.log(url);
})
.catch(function(err) {
  console.log(err);
});
<commit_msg>Test index module directly<commit_after>var index = require('./index.js');
var event = require('./test_event.json');

index.handler(event, null, ((err, res) => {
  if (err === null) {
    console.log('==> ' + res);
  } else {
    console.error('==> ' + err);
  }
}));

{'fraction_non_alphanumeric': 0.21929824561403508, 'fraction_numerical': 0.0, 'mean_word_length': 4.438095238095238, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '542491', 'n_tokens_mistral': 190, 'n_tokens_neox': 189, 'n_words': 39}