<commit_before>const chai = require('chai');
const chaiHttp = require('chai-http');
chai.use(chaiHttp);
const assert = chai.assert;
const app = require('../lib/app');
const mongoose = require('mongoose');

describe.only('authenticate credentials', () => {

    // before(() => {
    //     mongoose.connection.dropDatabase();
    // });

    const user = {
        name: 'test',
        email: '<EMAIL>',
        password: '<PASSWORD>'
    };

    const request = chai.request(app);

    describe('user management', () => {
        const badRequest = (url, data, error) =>
            request
            .post(url)
            .send(data)
            .then(
                () => { throw new Error('status should not be okay'); },
                res => {
                    assert.equal(res.status, 400);
                    assert.equal(res.response.body.error, error);<commit_msg>removed mongoose from requirements list<commit_after>const chai = require('chai');
const chaiHttp = require('chai-http');
chai.use(chaiHttp);
const assert = chai.assert;
const app = require('../lib/app');

describe.only('authenticate credentials', () => {

    const user = {
        name: 'test',
        email: '<EMAIL>',
        password: '<PASSWORD>'
    };

    const request = chai.request(app);

    describe('user management', () => {
        const badRequest = (url, data, error) =>
            request
            .post(url)
            .send(data)
            .then(
                () => { throw new Error('status should not be okay'); },
                res => {
                    assert.equal(res.status, 400);
                    assert.equal(res.response.body.error, error);
{'fraction_non_alphanumeric': 0.15861657722122838, 'fraction_numerical': 0.0035778175313059034, 'mean_word_length': 1.9857651245551602, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 18, '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': '3478086', 'n_tokens_mistral': 488, 'n_tokens_neox': 469, 'n_words': 106}