<commit_before>chai = require 'chai'
sinon = require 'sinon'
sinonChai = require 'sinon-chai'
_ = require 'underscore'
proxyquire = require('proxyquire').noCallThru()

assert = chai.assert
should = chai.should()
chai.use(sinonChai);

requestStub = sinon.stub()
requestStub.restore = () ->
  this.callsArgWith(1, null, {statusCode: 200}, '')

testFactory = proxyquire '../../lib/test-factory', {
  'request': requestStub
}


describe 'Test', ->

  describe '#run', ->

    describe 'of simple test', ->

      testFact = ''
      test = ''
      machine = ''

      before (done) ->

        testFact = new testFactory()
        test = testFact.create()
        test.name = 'POST /machines -> 201'
        test.request.server = 'http://abao.io'
        test.request.path = '/machines'
        test.request.method = 'POST'
        test.request.params =
          param: 'value'
        test.request.query =
          q: 'value'
        test.request.headers =
          key: 'value'<commit_msg>fixed wrong reference in the test-test<commit_after>chai = require 'chai'
sinon = require 'sinon'
sinonChai = require 'sinon-chai'
_ = require 'underscore'
proxyquire = require('proxyquire').noCallThru()

assert = chai.assert
should = chai.should()
chai.use(sinonChai);

requestStub = sinon.stub()
requestStub.restore = () ->
  this.callsArgWith(1, null, {statusCode: 200}, '')

testFactory = proxyquire '../../lib/test', {
  'request': requestStub
}


describe 'Test', ->

  describe '#run', ->

    describe 'of simple test', ->

      testFact = ''
      test = ''
      machine = ''

      before (done) ->

        testFact = new testFactory()
        test = testFact.create()
        test.name = 'POST /machines -> 201'
        test.request.server = 'http://abao.io'
        test.request.path = '/machines'
        test.request.method = 'POST'
        test.request.params =
          param: 'value'
        test.request.query =
          q: 'value'
        test.request.headers =
          key: 'value'
{'fraction_non_alphanumeric': 0.15307653826913456, 'fraction_numerical': 0.007003501750875438, 'mean_word_length': 2.4246575342465753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6171030', 'n_tokens_mistral': 660, 'n_tokens_neox': 639, 'n_words': 138}