<commit_before>Connection = require('../../lib/connection')
Request = require('../../lib/request')
TYPES = require('../../lib/data-type').typeByName
fs = require('fs')

getConfig = ->
  config = JSON.parse(fs.readFileSync(process.env.HOME + '/.tedious/test-connection.json', 'utf8'))

  config.options.debug =
    packet: true
    data: true
    payload: true
    token: false
    log: true

  config

exports.execProc = (test) ->
  test.expect(5)

  config = getConfig()

  request = new Request('sp_help', (err) ->
    console.log err
    test.ok(!err)

    connection.close()
  )

  request.addParameter(TYPES.NVarChar, 'objname', 'int')

  request.on('doneProc', (rowCount, more, returnStatus) -><commit_msg>Remove console.log call.<commit_after>Connection = require('../../lib/connection')
Request = require('../../lib/request')
TYPES = require('../../lib/data-type').typeByName
fs = require('fs')

getConfig = ->
  config = JSON.parse(fs.readFileSync(process.env.HOME + '/.tedious/test-connection.json', 'utf8'))

  config.options.debug =
    packet: true
    data: true
    payload: true
    token: false
    log: true

  config

exports.execProc = (test) ->
  test.expect(5)

  config = getConfig()

  request = new Request('sp_help', (err) ->
    test.ok(!err)

    connection.close()
  )

  request.addParameter(TYPES.NVarChar, 'objname', 'int')

  request.on('doneProc', (rowCount, more, returnStatus) ->
{'fraction_non_alphanumeric': 0.18162544169611308, 'fraction_numerical': 0.0028268551236749115, 'mean_word_length': 3.317073170731707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '105289', 'n_tokens_mistral': 473, 'n_tokens_neox': 464, 'n_words': 90}