<commit_before>var git = require('../').raw,
    path = require('path'),
    rimraf = require('rimraf');

var testRepo = new git.Repo();

// Helper functions
var helper = {
  // Test if obj is a true function
  testFunction: function(test, obj, label) {
    // The object reports itself as a function
    test(typeof obj, 'function', label +' reports as a function.');
    // This ensures the repo is actually a derivative of the Function [[Class]]
    test(toString.call(obj), '[object Function]', label +' [[Class]] is of type function.');
  },
  // Test code and handle exception thrown
  testException: function(test, fun, label) {
    try {
      fun();
      test(false, label);
    }
    catch (ex) {
      test(true, label);
    }
  }
};

// Blob
exports.constructor = function(test){
  test.expect(3);

  // Test for function
  helper.testFunction(test.equals, git.Blob, 'Blob');

  // Ensure we get an instance of Blob
  test.ok(new git.Blob() instanceof git.Blob, 'Invocation returns an instance of Blob');

  test.done();
};

// Blob::Lookup
exports.lookup = function(test) {
  var testOid = new git.Oid(),
      testRef = new git.Reference(testRepo),
      testBlob = new git.Blob();

  test.expect(5);

  // Test for function
  helper.testFunction(test.equals, testBlob.lookup, 'Blob::Lookup');

  // Test repo argument existence
  helper.testException(test.ok, function() {
    testBlob.lookup();
  }, 'Throw an exception if no repo Object');

  // Test Oid argument existence
  helper.testException(test.ok, function() {
    testBlob.lookup(testRepo);
  }, 'Throw an exception if no oid Object');

  // Test Callback argument existence
  helper.testException(test.ok, function() {
    testBlob.lookup(testRepo, testOid);
  }, 'Throw an exception if no callback Object');

  testRepo.open(path.resolve('../.git'), function() {

    //testOid.mkstr('59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5');

    //testCommit.lookup(testRepo, testOid, function(err) {
    //  var tree = new git.Tree(testRepo)
    //    , entry = new git.TreeEntry()
    //    , blob = new git.Blob(testRepo);

    //  if(!testCommit.tree(tree) && tree.entryCount() > 1) {
    //    tree.entryByIndex(entry, 1);
    //    entry.toObject(testRepo, blob);

    //    //console.log(entry.name() + ':');
    //    //console.log(blob.rawSize());
    //    //console.dir(blob.rawContent());
    //  }
    //});
    test.done();

  });
};

// Blob::RawContent
exports.rawContent = function(test) {
  var testOid = new git.Oid()
    , testBlob = new git.Blob()
    , testCommit = new git.Commit();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.rawContent, 'Blob::RawContent');

  testRepo.open(path.resolve('../.git'), function() {
    testOid.mkstr('59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5');

    testCommit.lookup(testRepo, testOid, function(err) {
      var tree = new git.Tree(testRepo),
          entry = new git.TreeEntry(),
          blob = new git.Blob(testRepo);

      //if(!testCommit.tree(tree) && tree.entryCount() > 1) {
      //  tree.entryByIndex(entry, 1);
      //  entry.toObject(testRepo, blob);

      //  //console.log(entry.name() + ':');
      //  //console.log(blob.rawSize());
      //  //console.dir(blob.rawContent());
      //}
    });
  });

  test.done();
};

// Blob::RawSize
exports.rawSize = function(test) {
  var testOid = new git.Oid(),
      testBlob = new git.Blob();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.rawSize, 'Blob::RawSize');

  test.done();
};

// Blob::Close
exports.close = function(test) {
  var testOid = new git.Oid(),
      testBlob = new git.Blob();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.close, 'Blob::Close');

  test.done();
};

// Blob::CreateFromFile
exports.createFromFile = function(test) {
  var testOid = new git.Oid(),
      testBlob = new git.Blob();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.createFromFile, 'Blob::Close');

  test.done();
};
<commit_msg>Removed blob raw size test<commit_after>var git = require('../').raw,
    path = require('path'),
    rimraf = require('rimraf');

var testRepo = new git.Repo();

// Helper functions
var helper = {
  // Test if obj is a true function
  testFunction: function(test, obj, label) {
    // The object reports itself as a function
    test(typeof obj, 'function', label +' reports as a function.');
    // This ensures the repo is actually a derivative of the Function [[Class]]
    test(toString.call(obj), '[object Function]', label +' [[Class]] is of type function.');
  },
  // Test code and handle exception thrown
  testException: function(test, fun, label) {
    try {
      fun();
      test(false, label);
    }
    catch (ex) {
      test(true, label);
    }
  }
};

// Blob
exports.constructor = function(test){
  test.expect(3);

  // Test for function
  helper.testFunction(test.equals, git.Blob, 'Blob');

  // Ensure we get an instance of Blob
  test.ok(new git.Blob() instanceof git.Blob, 'Invocation returns an instance of Blob');

  test.done();
};

// Blob::Lookup
exports.lookup = function(test) {
  var testOid = new git.Oid(),
      testRef = new git.Reference(testRepo),
      testBlob = new git.Blob();

  test.expect(5);

  // Test for function
  helper.testFunction(test.equals, testBlob.lookup, 'Blob::Lookup');

  // Test repo argument existence
  helper.testException(test.ok, function() {
    testBlob.lookup();
  }, 'Throw an exception if no repo Object');

  // Test Oid argument existence
  helper.testException(test.ok, function() {
    testBlob.lookup(testRepo);
  }, 'Throw an exception if no oid Object');

  // Test Callback argument existence
  helper.testException(test.ok, function() {
    testBlob.lookup(testRepo, testOid);
  }, 'Throw an exception if no callback Object');

  testRepo.open(path.resolve('../.git'), function() {

    //testOid.mkstr('59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5');

    //testCommit.lookup(testRepo, testOid, function(err) {
    //  var tree = new git.Tree(testRepo)
    //    , entry = new git.TreeEntry()
    //    , blob = new git.Blob(testRepo);

    //  if(!testCommit.tree(tree) && tree.entryCount() > 1) {
    //    tree.entryByIndex(entry, 1);
    //    entry.toObject(testRepo, blob);

    //    //console.log(entry.name() + ':');
    //    //console.log(blob.rawSize());
    //    //console.dir(blob.rawContent());
    //  }
    //});
    test.done();

  });
};

// Blob::RawContent
exports.rawContent = function(test) {
  var testOid = new git.Oid()
    , testBlob = new git.Blob()
    , testCommit = new git.Commit();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.rawContent, 'Blob::RawContent');

  testRepo.open(path.resolve('../.git'), function() {
    testOid.mkstr('59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5');

    testCommit.lookup(testRepo, testOid, function(err) {
      var tree = new git.Tree(testRepo),
          entry = new git.TreeEntry(),
          blob = new git.Blob(testRepo);

      //if(!testCommit.tree(tree) && tree.entryCount() > 1) {
      //  tree.entryByIndex(entry, 1);
      //  entry.toObject(testRepo, blob);

      //  //console.log(entry.name() + ':');
      //  //console.log(blob.rawSize());
      //  //console.dir(blob.rawContent());
      //}
    });
  });

  test.done();
};

// Blob::Close
exports.close = function(test) {
  var testOid = new git.Oid(),
      testBlob = new git.Blob();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.close, 'Blob::Close');

  test.done();
};

// Blob::CreateFromFile
exports.createFromFile = function(test) {
  var testOid = new git.Oid(),
      testBlob = new git.Blob();

  test.expect(2);

  // Test for function
  helper.testFunction(test.equals, testBlob.createFromFile, 'Blob::Close');

  test.done();
};

{'fraction_non_alphanumeric': 0.167192429022082, 'fraction_numerical': 0.01501577287066246, 'mean_word_length': 2.947211155378486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5476640', 'n_tokens_mistral': 2704, 'n_tokens_neox': 2642, 'n_words': 584}