<commit_before>// var assert = require('chai').assert;
// // var should = chai.should();
var Clip = require('../kindle-my-clippings');

// var clip = new Clip();

// describe('Array', function(){

//   describe('#indexOf()', function(){
//     it('should return -1 when the value is not present', function(){
//       assert.equal(-1, [1,2,3].indexOf(5));
//       assert.equal(-1, [1,2,3].indexOf(0));
//     });
//   });

// });

// Require chai.js expect module for assertions
var expect = require('chai').expect;

// Create a new test suite for our Bank Account
suite("Kindle clipping Tests", function() {

    var clip;

    setup(function () {
      clip = new Clip();
    });

    // Define a pending test
    test("should exist", function() {
        expect(clip).to.be.ok;
    });

    test('file reading', function(){
      clip.getFileContent(__dirname + '/' + 'My Clippings.txt', function (data) {
        expect(data).to.be.a('string');
      });
    });

    test('split file contents', function() {
      clip.getFileContent(__dirname + '/' + 'My Clippings.txt', function (data) {
        var output = clip.splitFileIntoRecords(data);
        expect(data).to.be.instanceof(Array);
        // expect(clip).to.be.ok;
      });
    });

});<commit_msg>async test basic<commit_after>// var assert = require('chai').assert;
// // var should = chai.should();
var Clip = require('../kindle-my-clippings');

// var clip = new Clip();

// describe('Array', function(){

//   describe('#indexOf()', function(){
//     it('should return -1 when the value is not present', function(){
//       assert.equal(-1, [1,2,3].indexOf(5));
//       assert.equal(-1, [1,2,3].indexOf(0));
//     });
//   });

// });

// Require chai.js expect module for assertions
var expect = require('chai').expect;

// Create a new test suite for our Bank Account
suite("Kindle clipping Tests", function() {

    var clip;
    var clipData;

    setup(function () {
      clip = new Clip();
    });

    // Define a pending test
    test("should exist", function() {
        expect(clip).to.be.ok;
    });

    test('file reading', function(done){
      clip.getFileContent(__dirname + '/' + 'My Clippings.txt', function (data) {
        clipData = data;
        expect(data).to.be.a('string');
        done();
      });
    });

    test('if split clip data is an array', function() {
      var output = clip.splitFileIntoRecords(clipData);
      expect(output).to.be.instanceof(Array);
    });

});
{'fraction_non_alphanumeric': 0.1946795646916566, 'fraction_numerical': 0.00886739218057235, 'mean_word_length': 2.6233576642335765, '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': '6290556', 'n_tokens_mistral': 783, 'n_tokens_neox': 765, 'n_words': 187}