<commit_before>var parse = require('../');
var test = require('tape');
var isFunction = require('lodash.isfunction');
var isPlainObject = require('lodash.isplainobject');
var fs = require('graceful-fs');
var path = require('path');

test('exports a function', function(t) {
  t.plan(1);
  t.ok(isFunction(parse));
});

test('works', function(t) {
  t.plan(5);
  var fix = path.resolve(__dirname, './fixture.txt');
  fs.readFile(fix, {encoding: 'ascii'}, function(error, data) {
    var parsed = parse(data);
    t.ok(isPlainObject(parsed));
    t.equal(parsed.lastSkillUsed, 0);
    t.equal(parsed.primalSouls, 2);
    t.equal(parsed.kongId, '');
    t.equal(parsed.currentZoneHeight, 123);
  });
});<commit_msg>`toString()` to possibly fix 0.8 build<commit_after>var parse = require('../');
var test = require('tape');
var isFunction = require('lodash.isfunction');
var isPlainObject = require('lodash.isplainobject');
var fs = require('graceful-fs');
var path = require('path');

test('exports a function', function(t) {
  t.plan(1);
  t.ok(isFunction(parse));
});

test('works', function(t) {
  t.plan(5);
  var fix = path.resolve(__dirname, './fixture.txt');
  fs.readFile(fix, {encoding: 'ascii'}, function(error, data) {
    var parsed = parse(data.toString());
    t.ok(isPlainObject(parsed));
    t.equal(parsed.lastSkillUsed, 0);
    t.equal(parsed.primalSouls, 2);
    t.equal(parsed.kongId, '');
    t.equal(parsed.currentZoneHeight, 123);
  });
});
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.010958904109589041, 'mean_word_length': 4.7976190476190474, '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': '5724561', 'n_tokens_mistral': 532, 'n_tokens_neox': 522, 'n_words': 99}