aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/core.js')
-rw-r--r--test/unit/core.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 8cfe98f83..1ddf695a6 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -1198,6 +1198,18 @@ test("jQuery.each(Object,Function)", function() {
equal( i, document.styleSheets.length, "Iteration over document.styleSheets" );
});
+test("jQuery.each/map(undefined/null,Function)", 1, function() {
+ try {
+ jQuery.each( undefined, jQuery.noop );
+ jQuery.each( null, jQuery.noop );
+ jQuery.map( undefined, jQuery.noop );
+ jQuery.map( null, jQuery.noop );
+ ok( true, "jQuery.each/map( undefined/null, function() {} );" );
+ } catch ( e ) {
+ ok( false, "each/map must accept null and undefined values" );
+ }
+});
+
test( "JIT compilation does not interfere with length retrieval (gh-2145)", function() {
expect( 4 );