diff options
author | Nilton Cesar <niltoncms@gmail.com> | 2017-11-22 14:43:44 -0500 |
---|---|---|
committer | Timmy Willison <4timmywil@gmail.com> | 2018-01-08 11:21:22 -0500 |
commit | 64a289286a743516bce82462200062a647ef3ac0 (patch) | |
tree | a98de0017aa21c031f59d1b21bd9ccea01a66f8d /test/unit/deprecated.js | |
parent | 3c0f2cfb05c94adb164ac863a96eb2cf09e8110a (diff) | |
download | jquery-64a289286a743516bce82462200062a647ef3ac0.tar.gz jquery-64a289286a743516bce82462200062a647ef3ac0.zip |
Core: make camelCase function available only for internal usage
Close gh-3604
Fixes gh-3384
Diffstat (limited to 'test/unit/deprecated.js')
-rw-r--r-- | test/unit/deprecated.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/deprecated.js b/test/unit/deprecated.js index f555ac655..6e44b3a45 100644 --- a/test/unit/deprecated.js +++ b/test/unit/deprecated.js @@ -183,3 +183,22 @@ QUnit.test( "jQuery.isWindow", function( assert ) { assert.ok( !jQuery.isWindow( /window/ ), "regexp" ); assert.ok( !jQuery.isWindow( function() {} ), "function" ); } ); + +QUnit.test( "jQuery.camelCase()", function( assert ) { + + var tests = { + "foo-bar": "fooBar", + "foo-bar-baz": "fooBarBaz", + "girl-u-want": "girlUWant", + "the-4th-dimension": "the-4thDimension", + "-o-tannenbaum": "OTannenbaum", + "-moz-illa": "MozIlla", + "-ms-take": "msTake" + }; + + assert.expect( 7 ); + + jQuery.each( tests, function( key, val ) { + assert.equal( jQuery.camelCase( key ), val, "Converts: " + key + " => " + val ); + } ); +} ); |