Whitespace cleanup for password strength meter tests. props TobiasBg. fixes #25088.
git-svn-id: https://develop.svn.wordpress.org/trunk@25275 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9c5265303
commit
093a580656
|
@ -12,15 +12,15 @@ jQuery(function() {
|
|||
test( 'long complicated passwords should return 4', function() {
|
||||
var password = function( length ) {
|
||||
var possibility = 'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
|
||||
retVal = "";
|
||||
for (var i = 0, n = possibility.length; i < length; ++i) {
|
||||
retVal = '';
|
||||
for ( var i = 0, n = possibility.length; i < length; i++ ) {
|
||||
retVal += possibility.charAt( Math.floor( Math.random() * n ) );
|
||||
}
|
||||
return retVal + 'aB2'; // add a lower case, uppercase and number just to make sure we always have one of each
|
||||
},
|
||||
twofifty = password( 250 );
|
||||
|
||||
equal( passwordStrength( twofifty , 'username', twofifty ), 4, '250 charachter complicated password returns 4');
|
||||
equal( passwordStrength( twofifty, 'username', twofifty ), 4, '250 character complicated password returns 4' );
|
||||
});
|
||||
|
||||
test( 'short uncomplicated passwords should return 0', function() {
|
||||
|
|
Loading…
Reference in New Issue