Add unit tests for Element#descendantOf.

This commit is contained in:
Tobie Langel 2008-09-03 16:42:31 -07:00
parent 6847d27509
commit 919b952ec3
2 changed files with 6 additions and 0 deletions

View File

@ -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]

View File

@ -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() {