From 919b952ec3abd9326b226ce9cfdc6688ebc458d8 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Wed, 3 Sep 2008 16:42:31 -0700 Subject: [PATCH] Add unit tests for Element#descendantOf. --- CHANGELOG | 2 ++ test/unit/dom_test.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index d332c1d..ccf7b6a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Add unit tests for Element#descendantOf. (jddalton) + * Form#serializeElements should not serialize file inputs. (kangax, Lonesome Boy) * Fix an issue with calling Event.pointer before the DOM is loaded. (kangax, jddalton) [#4 state:resolved] diff --git a/test/unit/dom_test.js b/test/unit/dom_test.js index 1d51c36..4776924 100644 --- a/test/unit/dom_test.js +++ b/test/unit/dom_test.js @@ -715,6 +715,10 @@ new Test.Unit.Runner({ $(document.body).insert(new Element('div', { id: 'impostor' })); this.assert(!$('impostor').descendantOf('ancestor')); + + // test descendantOf document + this.assert($(document.body).descendantOf(document)); + this.assert($(document.documentElement).descendantOf(document)); }, testChildOf: function() {