<commit_before>const assert = require('chai').assert;

const User = require('../../models/user');

describe.only('user model', () =>{
  it('example with all required fields', () => {
    return new User({
      firstName: 'a',
      lastName: 's',
      email: '<EMAIL>',
      password: 'f',
    }).validate();
  });

  it('requires firstName', () => {
    return new User({
      lastName: 's',
      email: '<EMAIL>',
      password: 'f',
    }).validate()
    .then(
      () => { throw new Error('validation should not pass'); },
      err => assert.isNotNull(err),
    );
  });

});<commit_msg>passes User model test - requires last name<commit_after>const assert = require('chai').assert;

const User = require('../../models/user');

describe.only('user model', () =>{
  it('example with all required fields', () => {
    return new User({
      firstName: 'a',
      lastName: 's',
      email: '<EMAIL>',
      password: 'f',
    }).validate();
  });

  it('requires firstName', () => {
    return new User({
      lastName: 's',
      email: '<EMAIL>',
      password: 'f',
    }).validate()
    .then(
      () => { throw new Error('validation should not pass'); },
      err => assert.isNotNull(err),
    );
  });

  it('requires lastName', () => {
    return new User({
      firstName: 'a',
      email: '<EMAIL>',
      password: 'f',
    }).validate()
    .then(
      () => { throw new Error('validation should not pass'); },
      err => assert.isNotNull(err),
    );
  });

});
{'fraction_non_alphanumeric': 0.20989304812834225, 'fraction_numerical': 0.0, 'mean_word_length': 2.4976635514018692, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 21, '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': '1357764', 'n_tokens_mistral': 469, 'n_tokens_neox': 465, 'n_words': 119}