aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2017-05-08 10:47:27 -0400
committerScott González <scott.gonzalez@gmail.com>2017-05-17 11:17:09 -0400
commit0940cb9bd2b8967c8eac15f3097933f5aee7e551 (patch)
tree1800a8f680480b3d17eec15ae1009ff3c4d95eec /tests
parentae31f2b3b478975f70526bdf3299464b9afa8bb1 (diff)
downloadjquery-ui-0940cb9bd2b8967c8eac15f3097933f5aee7e551.tar.gz
jquery-ui-0940cb9bd2b8967c8eac15f3097933f5aee7e551.zip
All: Remove uses of `jQuery.camelCase()`
Ref #15160 Ref gh-1813
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/qunit-assert-domequal.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/qunit-assert-domequal.js b/tests/lib/qunit-assert-domequal.js
index b22bd90b9..35695c4f1 100644
--- a/tests/lib/qunit-assert-domequal.js
+++ b/tests/lib/qunit-assert-domequal.js
@@ -59,6 +59,12 @@ domEqual.attributes = [
"title"
];
+function camelCase( string ) {
+ return string.replace( /-([\da-z])/gi, function( all, letter ) {
+ return letter.toUpperCase();
+ } );
+}
+
function getElementStyles( elem ) {
var styles = {};
var style = elem.ownerDocument.defaultView ?
@@ -71,7 +77,7 @@ function getElementStyles( elem ) {
while ( len-- ) {
key = style[ len ];
if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
+ styles[ camelCase( key ) ] = style[ key ];
}
}