<commit_before>'use strict';
var assert = require('chai').assert;
var expect = require('chai').expect;
var rc_util = require('../src/lib/utility.js');

var invalid_crawl = require('./data/invalid_crawl.json');
var valid_crawl = require('./data/valid_crawl.json');

//var db_url = 'postgres://postgres:postgres@127.0.0.1:5432/circle_test';
var db_url = 'postgres://svvrvhaiaqvblb:Y1tFJhSW5YnvA-7b1pJgzcO0F0@ec2-54-243-44-19<EMAIL>:5432/dck7lage8dbjm1'

describe('Rawcrawl Util', function() {
  describe('#getRippleds()', function() {
    it("Shouldn't throw an error when given valid crawl data", function() {
      rc_util.getRippleds(valid_crawl.data);
    });
    it("Should throw an error when given invalid crawl data", function() {
      expect(function () { rc_util.getRippleds(invalid_crawl.data);}).to.throw(Error);
    });
    it("Should return an object", function() {
      var obj = rc_util.getRippleds(valid_crawl.data);
      expect(obj).to.be.an('object');
    });
  });
  describe('#getRippledsC()', function() {
    it("Shouldn't throw an error when given valid crawl data", function() {
      rc_util.getRippledsC(valid_crawl.data);
    });
    it("Should throw an error when given invalid crawl data", function() {
      expect(function () { rc_util.getRippledsC(invalid_crawl.data);}).to.throw(Error);
    });
    it("Should return an object", function() {
      var obj = rc_util.getRippledsC(valid_crawl.data);
      expect(obj).to.be.an('object');
    });
  });<commit_msg>fixed db url<commit_after>'use strict';
var assert = require('chai').assert;
var expect = require('chai').expect;
var rc_util = require('../src/lib/utility.js');

var invalid_crawl = require('./data/invalid_crawl.json');
var valid_crawl = require('./data/valid_crawl.json');

var db_url = 'postgres://postgres:postgres@127.0.0.1:5432/circle_test';

describe('Rawcrawl Util', function() {
  describe('#getRippleds()', function() {
    it("Shouldn't throw an error when given valid crawl data", function() {
      rc_util.getRippleds(valid_crawl.data);
    });
    it("Should throw an error when given invalid crawl data", function() {
      expect(function () { rc_util.getRippleds(invalid_crawl.data);}).to.throw(Error);
    });
    it("Should return an object", function() {
      var obj = rc_util.getRippleds(valid_crawl.data);
      expect(obj).to.be.an('object');
    });
  });
  describe('#getRippledsC()', function() {
    it("Shouldn't throw an error when given valid crawl data", function() {
      rc_util.getRippledsC(valid_crawl.data);
    });
    it("Should throw an error when given invalid crawl data", function() {
      expect(function () { rc_util.getRippledsC(invalid_crawl.data);}).to.throw(Error);
    });
    it("Should return an object", function() {
      var obj = rc_util.getRippledsC(valid_crawl.data);
      expect(obj).to.be.an('object');
    });
  });
{'fraction_non_alphanumeric': 0.16996871741397288, 'fraction_numerical': 0.014946124435175531, 'mean_word_length': 4.166965888689408, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '313100', 'n_tokens_mistral': 1038, 'n_tokens_neox': 986, 'n_words': 187}