Build/Test & External Libraries : Fix jQuery deprecation.

jQuery.isArray is deprecated. Array.isArray is safe and used in other parts of the code base.

See: #51812


git-svn-id: https://develop.svn.wordpress.org/trunk@50627 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin 2021-03-31 20:27:06 +00:00
parent f7d5b2bca6
commit dbb719f8b4

View File

@ -95,7 +95,7 @@ jQuery( function() {
QUnit.test( 'user input disallowed list array should contain expected words', function( assert ) {
var disallowedList = wp.passwordStrength.userInputDisallowedList();
assert.ok( jQuery.isArray( disallowedList ), 'disallowed list is an array' );
assert.ok( Array.isArray( disallowedList ), 'disallowed list is an array' );
assert.ok( jQuery.inArray( 'WordPress', disallowedList ) > -1, 'disallowed list contains "WordPress" from page title' );
assert.ok( jQuery.inArray( 'tests', disallowedList ) > -1, 'disallowed list contains "tests" from site URL' );
});