<commit_before>import { expect } from 'chai';
import AccountPassword from '../src/AccountPassword';

describe('Mongoose Account Password', () => {
  let accountPassword;

  beforeEach(() => {
    accountPassword = new AccountPassword();
  });

  it('Should be has attribute logger and also has to be a function', () => {
    const { logger } = accountPassword;
    expect(typeof logger === 'function').eql(true);
  });
});<commit_msg>[UNIT-TEST] - Account password<commit_after>import chai from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
chai.use(sinonChai);
const { expect } = chai;
import AccountPassword from '../src/AccountPassword';

describe('Mongoose Account Password', () => {
  let accountPassword;

  beforeEach(() => {
    accountPassword = new AccountPassword();
    accountPassword.Model = {
      find: sinon.spy(),
      findOne: sinon.spy()
    }
  });

  context('when execute accountPassword', () => {
    it('Should be execute this.Model.find', (done) => {
      const result = accountPassword.accountPassword();
      expect(accountPassword.Model.find).to.have.been.called;
      done();
    });
  });

  context('when execute findAccount', () => {
    it('Should be execute this.Model.find', () => {
      const result = accountPassword.findAccount("123");
      expect(accountPassword.Model.findOne).to.have.been.called;
    });
  });
});
{'fraction_non_alphanumeric': 0.16138328530259366, 'fraction_numerical': 0.002161383285302594, 'mean_word_length': 3.7731958762886597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '6037213', 'n_tokens_mistral': 416, 'n_tokens_neox': 401, 'n_words': 95}