<commit_before>'use strict';

var arrayUniquePlugin = require('../');
var assert = require('assert');
var mongodb = require('mongodb');
var mongoose = require('mongoose');

describe('API', function() {
  let db;

  before(function(done) {
    const uri = 'mongodb://localhost:27017/test';
    mongoose.connect(uri);
    mongodb.MongoClient.connect(uri, function(error, _db) {
      assert.ifError(error);
      db = _db;
      done();
    });
  });

  beforeEach(function(done) {
    db.dropDatabase(done);
  });
<commit_msg>chore: fix deprecation warning<commit_after>'use strict';

var arrayUniquePlugin = require('../');
var assert = require('assert');
var mongodb = require('mongodb');
var mongoose = require('mongoose');

describe('API', function() {
  let db;

  before(function(done) {
    const uri = 'mongodb://localhost:27017/test';
    mongoose.connect(uri, { useNewUrlParser: true });
    mongodb.MongoClient.connect(uri, function(error, _db) {
      assert.ifError(error);
      db = _db;
      done();
    });
  });

  beforeEach(function(done) {
    db.dropDatabase(done);
  });

{'fraction_non_alphanumeric': 0.17276051188299818, 'fraction_numerical': 0.009140767824497258, 'mean_word_length': 3.888392857142857, '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': '6776488', 'n_tokens_mistral': 372, 'n_tokens_neox': 356, 'n_words': 69}