<commit_before>'use strict'
var TestRunner = require('test-runner')
var jsdocParse = require('../')
var fs = require('fs')
var a = require('assert')
var runner = new TestRunner()

runner.test('api: valid json out', function () {
  var jsdocOutput = JSON.parse(fs.readFileSync('./test/fixture/jsdoc-input.json', 'utf8'))
  var data = jsdocParse(jsdocOutput)
  a.strictEqual(data[0].name, 'Chainable')
})

test('api: conf', function (t) {
  t.plan(1)
  var stream = parse({ src: 'test/fixture/simple.js', conf: 'test/fixture/conf.json' })
  stream.on('readable', function () {
    var chunk = this.read()
    if (chunk) {
      var data = JSON.parse(chunk)
      t.strictEqual(data[0].description, 'A VARIABLE')
    }
  })
})<commit_msg>fix tests<commit_after>'use strict'
var TestRunner = require('test-runner')
var jsdocParse = require('../')
var fs = require('fs')
var a = require('assert')
var runner = new TestRunner()

runner.test('api: valid json out', function () {
  var jsdocOutput = JSON.parse(fs.readFileSync('./test/fixture/jsdoc-input.json', 'utf8'))
  var data = jsdocParse(jsdocOutput)
  a.strictEqual(data[0].name, 'Chainable')
})
{'fraction_non_alphanumeric': 0.18165938864628822, 'fraction_numerical': 0.005240174672489083, 'mean_word_length': 4.483253588516747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7265211', 'n_tokens_mistral': 393, 'n_tokens_neox': 391, 'n_words': 90}