<commit_before>chai        = require 'chai'
should      = chai.should()
expect      = chai.expect
create_liar = require './create_liar'

# TODO
# yield
#  yields must have value or on_value
# yields with null
# Check for value on callback arguments
# Give context to error messages
# times called
# delay
# required
# Maybe some nice debug output
# better variable names ("liar" sucks)
# Some kind of terminology to separate the caller and the callee
#   crazy argument confusion in run_callback
# yield is probably not the greatest word.
# Test duplication!

describe 'create_liar', ->

  it 'Should simulate a function call', ->

    liar = create_liar [
      function_name: 'someFunction'
      returns:
        value:
          someProperty: 5
    ]

    liar.someFunction().should.deep.equal
      someProperty: 5

  describe 'arguments provided', -><commit_msg>Dreamt up more TODOs<commit_after>chai        = require 'chai'
should      = chai.should()
expect      = chai.expect
create_liar = require './create_liar'

# TODO
# Todo separate tests
# yield
#  yields must have value or on_value
# yields with null
# Check for value on callback arguments
# Give context to error messages
# times called
# delay
# required
# Maybe some nice debug output
# better variable names ("liar" sucks)
# Some kind of terminology to separate the caller and the callee
#   crazy argument confusion in run_callback
# yield is probably not the greatest word.
# Test duplication!
# Implicit arrays
# plugins
  # yields_result plugin
  # yeilds_error
  # promise plugin

describe 'create_liar', ->

  it 'Should simulate a function call', ->

    liar = create_liar [
      function_name: 'someFunction'
      returns:
        value:
          someProperty: 5
    ]

    liar.someFunction().should.deep.equal
      someProperty: 5

  describe 'arguments provided', ->
{'fraction_non_alphanumeric': 0.07766990291262135, 'fraction_numerical': 0.002157497303128371, 'mean_word_length': 3.2063492063492065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1912348', 'n_tokens_mistral': 535, 'n_tokens_neox': 518, 'n_words': 200}