Skip to content

Commit 1c04886

Browse files
committed
Fix jquery deprecations
Bug: T280944
1 parent a5d093e commit 1c04886

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/valueParsers/ValueParserStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @throws {Error} if the provided argument is not a valueParsers.ValueParser constructor.
1010
*/
1111
function assertIsValueParserConstructor( Parser ) {
12-
if( !( $.isFunction( Parser ) && Parser.prototype instanceof vp.ValueParser ) ) {
12+
if( !( typeof Parser === 'function' && Parser.prototype instanceof vp.ValueParser ) ) {
1313
throw new Error( 'Invalid ValueParser constructor' );
1414
}
1515
}

tests/src/dataValues.DataValue.tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
var self = this;
8585

8686
$.each( this, function( property, value ) {
87-
if ( property.substring( 0, 4 ) === 'test' && $.isFunction( self[property] ) ) {
87+
if ( property.substring( 0, 4 ) === 'test' && typeof self[property] === 'function' ) {
8888
QUnit.test(
8989
property,
9090
function( assert ) {
@@ -137,7 +137,7 @@
137137
var fnNewFromJSON = this.getConstructor().newFromJSON;
138138

139139
assert.ok(
140-
$.isFunction( fnNewFromJSON ),
140+
typeof fnNewFromJSON === 'function',
141141
'has a related newFromJSON function'
142142
);
143143
},

tests/src/dataValues.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
var dvs = dv.getDataValues();
1212
assert.expect( dvs.length * 2 + 1 );
1313

14-
assert.ok( $.isArray( dvs ), 'Returns an array' );
14+
assert.ok( Array.isArray( dvs ), 'Returns an array' );
1515

1616
for ( var i = 0, s = dvs.length; i < s; i++ ) {
1717
assert.ok(

tests/src/valueFormatters/valueFormatters.tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
var self = this;
7070

7171
$.each( this, function( property, value ) {
72-
if( property.substring( 0, 4 ) === 'test' && $.isFunction( self[property] ) ) {
72+
if( property.substring( 0, 4 ) === 'test' && typeof self[property] === 'function' ) {
7373
QUnit.test(
7474
property,
7575
function( assert ) {
@@ -100,7 +100,7 @@
100100
: '',
101101
done = assert.async();
102102

103-
if( $.isArray( expected ) ) {
103+
if( Array.isArray( expected ) ) {
104104
expectedValue = expected[0];
105105
expectedDataValue = expected[1];
106106
} else {

tests/src/valueParsers/valueParsers.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
var self = this;
7676

7777
$.each( this, function( property, value ) {
78-
if ( property.substring( 0, 4 ) === 'test' && $.isFunction( self[property] ) ) {
78+
if ( property.substring( 0, 4 ) === 'test' && typeof self[property] === 'function' ) {
7979
QUnit.test(
8080
property,
8181
function( assert ) {

0 commit comments

Comments
 (0)