From 64a289286a743516bce82462200062a647ef3ac0 Mon Sep 17 00:00:00 2001 From: Nilton Cesar Date: Wed, 22 Nov 2017 14:43:44 -0500 Subject: Core: make camelCase function available only for internal usage Close gh-3604 Fixes gh-3384 --- test/unit/deprecated.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/unit/deprecated.js') 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 ); + } ); +} ); -- cgit v1.2.3