You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
680 B

  1. import assert from 'assert';
  2. import * as lesspass from '../app/lesspass';
  3. describe('lesspass', function () {
  4. it('should return a default password with a size of 10', function () {
  5. var generatedPassword = lesspass.make_password('password', 'facebook');
  6. assert.equal(10, generatedPassword.length);
  7. });
  8. it('should allow to change password length', function () {
  9. var generatedPassword = lesspass.make_password('password', 'facebook', 12);
  10. assert.equal(12, generatedPassword.length);
  11. });
  12. it('should hmac with hash sha256', function () {
  13. assert.equal('Y2ViYmVlZm', lesspass.make_password('password', 'facebook'));
  14. });
  15. });