<commit_before>"use strict";

var clerk = require("../clerk");
var expect = require("expect.js");

exports.clerkFactory = function () {
  this.baseURL = "http://test:xyzzy@127.0.0.1:5984";
  this.dbname = "clerk-test-" + (1000000 * Math.random() | 0);
  this.client = clerk(this.baseURL);
  this.db = this.client.db(this.dbname);
};

exports.randomId = function () {
  return "clerk-test-" + Date.now() + (Math.random() * 1000000 | 0);
};

exports.docFactory = function () {
  this.doc = {
    _id: exports.randomId(),
    hello: "world"
  };
  this.docs = [];
  var i, j;
  for (i = 1; i < 10; i++) {
    this.docs.push({
      _id: exports.randomId(),
      hello: "world" + i
    });
  }
};

exports.createDB = function (key) {
  return function (done) {
    this[key].create(function (err, body, status, headers, res) {
      if (!err) {
        exports.shouldBeOk(body);<commit_msg>Remove auth from test setup<commit_after>"use strict";

var clerk = require("../clerk");
var expect = require("expect.js");

exports.clerkFactory = function () {
  this.baseURL = "http://127.0.0.1:5984";
  this.dbname = "clerk-test-" + (1000 * Math.random() | 0);
  this.client = clerk(this.baseURL);
  this.db = this.client.db(this.dbname);
};

exports.randomId = function () {
  return "clerk-test-" + Date.now() + (Math.random() * 1000000 | 0);
};

exports.docFactory = function () {
  this.doc = {
    _id: exports.randomId(),
    hello: "world"
  };
  this.docs = [];
  var i, j;
  for (i = 1; i < 10; i++) {
    this.docs.push({
      _id: exports.randomId(),
      hello: "world" + i
    });
  }
};

exports.createDB = function (key) {
  return function (done) {
    this[key].create(function (err, body, status, headers, res) {
      if (!err) {
        exports.shouldBeOk(body);
{'fraction_non_alphanumeric': 0.19729425028184894, 'fraction_numerical': 0.03100338218714769, 'mean_word_length': 3.0249433106575965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7507500', 'n_tokens_mistral': 696, 'n_tokens_neox': 642, 'n_words': 137}