aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/event.js
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-12-07 01:52:21 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-12-07 01:52:21 +0000
commitffbedf0262b3eea906f39c0115b818d7456a3994 (patch)
tree69dc757c4b0eaa921ab58b8d35271a5ca2d26e90 /test/unit/event.js
parent12ef255ffdb3c2d045ee37beb9419f14d9c30217 (diff)
downloadjquery-ffbedf0262b3eea906f39c0115b818d7456a3994.tar.gz
jquery-ffbedf0262b3eea906f39c0115b818d7456a3994.zip
Fixed #1039 and #1733 by going through the core API and making them text node and comment node safe.
Diffstat (limited to 'test/unit/event.js')
-rw-r--r--test/unit/event.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index e1a95497d..e27530e1f 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -1,7 +1,7 @@
module("event");
test("bind()", function() {
- expect(15);
+ expect(16);
var handler = function(event) {
ok( event.data, "bind() with data, check passed data exists" );
@@ -67,6 +67,11 @@ test("bind()", function() {
// Trigger the remaining fn (1)
$("#firstp").trigger("click");
+
+ // using contents will get comments regular, text, and comment nodes
+ $("#nonnodes").contents().bind("tester", function () {
+ equals(this.nodeType, 1, "Check node,textnode,comment bind just does real nodes" );
+ }).trigger("tester");
});
test("click()", function() {