<commit_before>var http = require('http'),
    https = require('https'),
    fs = require('fs'),
    crypto = require('crypto'),
    should = require('should'),
    Assertion = should.Assertion,
    httpreq = require('request'),
    bufferedRequest = require('../'),
    version = require('../package').version

describe('buffered-request', function () {
  it('should export the right module version', function () {
    bufferedRequest.version.should.be.equal(version)
  })
  it('should patch IncomingMessage.prototype / http', function (done) {
    var server = http.createServer(function (request, response) {
      request.makeBuffered.should.be.instanceof(Function)
      response.end()
      server.close()
      done()
    })
    server.listen(8080, function () {
      httpreq('http://localhost:8080')
    })
  })
  it('should patch IncomingMessage.prototype / https', function (done) {
    var server = https.createServer({
      key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
      cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
    }, function (request, response) {
      request.makeBuffered.should.be.instanceof(Function)
      response.end()
      server.close()
      done()
    })
    server.listen(8080, function () {
      httpreq('https://localhost:8080')
    })
  })<commit_msg>removed test suite duplicate :dancers:<commit_after>var http = require('http'),
    https = require('https'),
    fs = require('fs'),
    crypto = require('crypto'),
    should = require('should'),
    Assertion = should.Assertion,
    httpreq = require('request'),
    bufferedRequest = require('../'),
    version = require('../package').version

describe('buffered-request', function () {
  it('should export the right module version', function () {
    bufferedRequest.version.should.be.equal(version)
  })
  it('should patch IncomingMessage.prototype / http', function (done) {
    var server = http.createServer(function (request, response) {
      request.makeBuffered.should.be.instanceof(Function)
      response.end()
      server.close()
      done()
    })
    server.listen(8080, function () {
      httpreq('http://localhost:8080')
    })
  })
{'fraction_non_alphanumeric': 0.15787058283616337, 'fraction_numerical': 0.011932078935291418, 'mean_word_length': 3.3775100401606424, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5604094', 'n_tokens_mistral': 648, 'n_tokens_neox': 617, 'n_words': 121}