<commit_before>import supertest from 'supertest';
import 'mocha';
import 'chai';
import should from 'should';
import app from './../app';
import User from '../models/user';
// import users from './../../seed/users.json';

const server = supertest.agent(app);
const user = [{
  username: 'tundun',
  password: '<PASSWORD>',
  email: '<EMAIL>',
  fullName: '<NAME>'
}, {
  username: 'lolade',
  password: '<PASSWORD>',
  email: '<EMAIL>',
  fullName: '<NAME>'
}];
const loginUser = {
  username: 'lolade',
  password: '<PASSWORD>'
};

// before((done) => {
//   User.sync().then(() => {
//     done(null);
//   }).catch((errors) => {
//     done(errors);
//   });
// });

describe('Authentication', () => {
  // beforeEach((done) => {
  //   User.sync().then(() => {
  //     done();
  //   });
  // });

  afterEach((done) => {<commit_msg>refactoring auth test file to include before function for creating tables<commit_after>import supertest from 'supertest';
import 'mocha';
import 'chai';
import should from 'should';
import app from './../app';
import User from '../models/user';
// import users from './../../seed/users.json';

const server = supertest.agent(app);
const user = [{
  username: 'tundun',
  password: '<PASSWORD>',
  email: '<EMAIL>',
  fullName: '<NAME>'
}, {
  username: 'lolade',
  password: '<PASSWORD>',
  email: '<EMAIL>',
  fullName: '<NAME>'
}];
const loginUser = {
  username: 'lolade',
  password: '<PASSWORD>'
};

before((done) => {
  User.sync().then(() => {
    done(null);
  }).catch((errors) => {
    done(errors);
  });
});

describe('Authentication', () => {
  // beforeEach((done) => {
  //   User.sync().then(() => {
  //     done();
  //   });
  // });

  afterEach((done) => {
{'fraction_non_alphanumeric': 0.2425655976676385, 'fraction_numerical': 0.0, 'mean_word_length': 3.1853658536585368, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 31, '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': '2849981', 'n_tokens_mistral': 582, 'n_tokens_neox': 583, 'n_words': 132}