|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- var assert = chai.assert;
-
- describe('LessPass v2', function () {
- describe('API', function () {
- it('render password', function () {
- this.timeout(10000);
- var site = 'example.org';
- var login = 'contact@example.org';
- var masterPassword = 'password';
- var passwordProfile = {
- lowercase: true,
- uppercase: true,
- digits: true,
- symbols: true,
- length: 16,
- index: 1,
- version: 2
- };
- return LessPass.generatePassword(site, login, masterPassword, passwordProfile).then(function (generatedPassword) {
- assert.equal('WHLpUL)e00[iHR+w', generatedPassword);
- });
- });
- it('render password no symbols', function () {
- this.timeout(10000);
- var site = 'example.org';
- var login = 'contact@example.org';
- var masterPassword = 'password';
- var passwordProfile = {
- lowercase: true,
- uppercase: true,
- digits: true,
- symbols: false,
- length: 14,
- index: 2,
- version: 2
- };
- return LessPass.generatePassword(site, login, masterPassword, passwordProfile).then(function (generatedPassword) {
- assert.equal('MBAsB7b1Prt8Sl', generatedPassword);
- });
- });
- it('render password only digit', function () {
- this.timeout(10000);
- var site = 'example.org';
- var login = 'contact@example.org';
- var masterPassword = 'password';
- var passwordProfile = {
- lowercase: false,
- uppercase: false,
- digits: true,
- symbols: false,
- length: 6,
- index: 3,
- version: 2
- };
- return LessPass.generatePassword(site, login, masterPassword, passwordProfile).then(function (generatedPassword) {
- assert.equal('117843', generatedPassword);
- });
- });
- it('render password no number', function () {
- this.timeout(10000);
- var site = 'example.org';
- var login = 'contact@example.org';
- var masterPassword = 'password';
- var passwordProfile = {
- lowercase: true,
- uppercase: true,
- digits: false,
- symbols: true,
- length: 14,
- index: 1,
- version: 2
- };
- return LessPass.generatePassword(site, login, masterPassword, passwordProfile).then(function (generatedPassword) {
- assert.equal("sB>{qF}wN%/-fm", generatedPassword);
- });
- });
- });
- });
-
|