aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2014-12-09 19:59:56 -0500
committerDave Methvin <dave.methvin@gmail.com>2014-12-09 19:59:56 -0500
commit8653068dd6b8a515f5c1d8a0fda4479e9534103e (patch)
tree1bc3763feea796ee0615be7f62c55675a044ed78 /test/unit
parentb77983173e18724a883e02ad3a84661e18e6cf4a (diff)
downloadjquery-8653068dd6b8a515f5c1d8a0fda4479e9534103e.tar.gz
jquery-8653068dd6b8a515f5c1d8a0fda4479e9534103e.zip
Event: Empty namespaces should be uneventfully ignored
Thanks @hamishdickson for the report! Closes gh-1769
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/event.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index 7e2bc26b6..8e33c6b90 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -583,6 +583,17 @@ test("namespace-only event binding is a no-op", function(){
.off("whoops");
});
+test("Empty namespace is ignored", function(){
+ expect( 1 );
+
+ jQuery("#firstp")
+ .on( "meow.", function( e ) {
+ equal( e.namespace, "", "triggered a namespace-less meow event" );
+ })
+ .trigger("meow.")
+ .off("meow.");
+});
+
test("on(), with same function", function() {
expect(2);