<commit_before>import { expect } from 'chai';
import request from 'supertest';

import User from '../../server/APIv1/users/userController.js';


describe('User APIv1 tests', () => {

  const app = {};
  // before((done) => {
  //   done();
  // });

  describe('server-database', () => {
    describe('CRUD on users', () => {
      it('Should create a new user', (done) => {
        app.request = {
          body: {
            username: `FakeUser ${Math.random() + new Date() }`,
            createdAt: '2016-05-01 01:00:02.313',
            avatar: 'none',
          },
        };
        app.response = {};
        app.next = (callback) => {
          callback();
        };

        User.createUser(app.request, app.response, app.next());
      });
      it('Should create a new user only if one with properties does not exist', (done) => {
        User.createUser(app.request, app.response, app.next(done));
      });
      it('Should get info for the current user');
      it('Should update the current user');
      it('Should delete a user');<commit_msg>Update imports in userController tests to remove supertest, add stubs<commit_after>import { expect } from 'chai';
import Stubs from './Stubs.js';
const app = {};

import Users from '../../server/APIv1/users/userController.js';

describe('User APIv1 tests', () => {

  const app = {};
  // before((done) => {
  //   done();
  // });

  describe('server-database', () => {
    describe('CRUD on users', () => {
      it('Should create a new user', (done) => {
        app.request = {
          body: {
            username: `FakeUser ${Math.random() + new Date() }`,
            createdAt: '2016-05-01 01:00:02.313',
            avatar: 'none',
          },
        };
        app.response = {};
        app.next = (callback) => {
          callback();
        };

        User.createUser(app.request, app.response, app.next());
      });
      it('Should create a new user only if one with properties does not exist', (done) => {
        User.createUser(app.request, app.response, app.next(done));
      });
      it('Should get info for the current user');
      it('Should update the current user');
      it('Should delete a user');
{'fraction_non_alphanumeric': 0.17387346381429222, 'fraction_numerical': 0.01729631315430132, 'mean_word_length': 2.1947674418604652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '4133088', 'n_tokens_mistral': 670, 'n_tokens_neox': 639, 'n_words': 172}