<commit_before>expect = require('chai').expect

fetchTweets = require '../index'

twitterKeys = {
  consumer_key : '<KEY>'
  consumer_secret : '<KEY>'
}

describe 'Check the modules basic functionality', ()->

  it 'Should create a new instance of fetch-tweets with twitter keys and default second param', ()->




<commit_msg>Wrote unit tests for general class functionality<commit_after>expect = require('chai').expect

streamTweets = require '../index'

twitterKeys = {
  consumer_key : '<KEY>'
  consumer_secret : '<KEY>'
}

describe 'Check the modules basic functionality', ()->

  it 'Should create a new instance of stream-tweets with twitter keys and default second param', ()->
    newInstance = new streamTweets(twitterKeys)
    expect(newInstance).to.be.an.instanceof(streamTweets)
    expect(newInstance.credentials).equal(twitterKeys)
    expect(newInstance.shouldFormatResults).equal true

  it 'Should create a new instance of stream-tweets with 2 params passed to constructor', ()->
    newInstance2 = new streamTweets(twitterKeys, false)
    expect(newInstance2).to.be.an.instanceOf(streamTweets)
    expect(newInstance2.credentials).equal(twitterKeys)
    expect(newInstance2.shouldFormatResults).to.be.a('boolean')
    expect(newInstance2.shouldFormatResults).equal(false)




{'fraction_non_alphanumeric': 0.11505791505791506, 'fraction_numerical': 0.004633204633204633, 'mean_word_length': 4.864253393665158, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 12, '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': '3795162', 'n_tokens_mistral': 383, 'n_tokens_neox': 368, 'n_words': 97}