<commit_before>'use strict';

var db = require('../lib/db.js');
var mongoose = require('mongoose');

describe('Database', function() {

  var testThreadId = mongoose.Types.ObjectId();

  var testThread = {
    imageId: mongoose.Types.ObjectId(),
    threadId: testThreadId,
    author: 'anonymous',
    fileName: 'image.jpg',
    title: 'Test Title',
    comment: 'Test Comment',
    firstPost: true
  };

  var testReply = {
    imageId: mongoose.Types.ObjectId(),
    threadId: testThreadId,
    author: 'anonymous',
    fileName: 'image.jpg',
    title: '',
    comment: 'Test Reply',
    firstPost: false
  };

  it('create an image thread', function() {

    db.createThread(testThread, function(){});
    db.createThread(testReply, function(){});

    db.imageModel.find({ threadId: testThreadId }, function (err, kittens) {
      if (err) return console.error(err);
      console.log(kittens);
    });

  });

});<commit_msg>Fix Linting<commit_after>'use strict';

var db = require('../lib/db.js');
var mongoose = require('mongoose');

describe('Database', function() {

  var testThreadId = mongoose.Types.ObjectId();

  var testThread = {
    imageId: mongoose.Types.ObjectId(),
    threadId: testThreadId,
    author: 'anonymous',
    fileName: 'image.jpg',
    title: 'Test Title',
    comment: 'Test Comment',
    firstPost: true
  };

  var testReply = {
    imageId: mongoose.Types.ObjectId(),
    threadId: testThreadId,
    author: 'anonymous',
    fileName: 'image.jpg',
    title: '',
    comment: 'Test Reply',
    firstPost: false
  };

  it('create an image thread', function() {

    db.createThread(testThread, function(){});
    db.createThread(testReply, function(){});

    db.imageModel.find({ threadId: testThreadId }, function (err, kittens) {
      if (err) { return console.error(err); }
      console.log(kittens);
    });

  });

});
{'fraction_non_alphanumeric': 0.16291532690246516, 'fraction_numerical': 0.0, 'mean_word_length': 3.4033018867924527, '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': '1824107', 'n_tokens_mistral': 610, 'n_tokens_neox': 605, 'n_words': 135}