Skip to content

Commit

Permalink
node_tests: Add test for long low-quality passwords.
Browse files Browse the repository at this point in the history
  • Loading branch information
lonerz authored and timabbott committed May 23, 2017
1 parent 287aaa2 commit 525cc34
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend_tests/node_tests/password.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,14 @@ var common = require("js/common.js");
assert(accepted);
assert.equal(bar.w, '10.390277164940581%');
assert.equal(bar.added_class, 'bar-success');

password = 'aaaaaaaa';
accepted = common.password_quality(password, bar, password_field(6, 1000));
assert(!accepted);
assert.equal(bar.added_class, 'bar-danger');

delete global.zxcvbn;
password = 'aaaaaaaa';
accepted = common.password_quality(password, bar, password_field(6, 1000));
assert(accepted === undefined);
}());

0 comments on commit 525cc34

Please sign in to comment.