Changeset 26040
- Timestamp:
- 11/07/2013 08:40:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/qunit/wp-admin/js/password-strength-meter.js
r25992 r26040 13 13 test( 'long complicated passwords should return 4', function() { 14 14 var password = function( length ) { 15 var possibility = 'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',16 retVal = '';17 for ( vari = 0, n = possibility.length; i < length; i++ ) {15 var i, n, retVal = '', 16 possibility = 'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; 17 for ( i = 0, n = possibility.length; i < length; i++ ) { 18 18 retVal += possibility.charAt( Math.floor( Math.random() * n ) ); 19 19 } … … 37 37 38 38 test( 'zxcvbn password tests should return the score we expect', function() { 39 var passwords = [ 39 var passwords, i; 40 passwords = [ 40 41 { pw: 'zxcvbn', score: 0 }, 41 42 { pw: 'qwER43@!', score: 1 }, … … 74 75 ]; 75 76 76 for ( vari = 0; i < passwords.length; i++ ) {77 for ( i = 0; i < passwords.length; i++ ) { 77 78 equal( passwordStrength( passwords[i].pw, 'username', passwords[i].pw ), passwords[i].score, 'password of `' + passwords[i].pw + '` returns ' + passwords[i].score ); 78 79 }
Note: See TracChangeset
for help on using the changeset viewer.