premasagar / pablo

Pablo is a lightweight, expressive JavaScript SVG library. Pablo creates interactive drawings with SVG (Scalable Vector Graphics), giving access to all of SVG's granularity and power.
https://pablojs.com
MIT License
413 stars 16 forks source link

Test for some() using elements in DOM, and elements out of DOM with a parent #48

Closed premasagar closed 11 years ago

premasagar commented 11 years ago

Currently, there is just a test for elements out of DOM with no parent

AaronAcerboni commented 11 years ago

I've added an out of DOM test for an element with a parent but it seems to be failing.

var subject = Pablo(document.createElement('span'));

subject.append(document.createElement('a'));

expect(subject.some('span a')).to.eql(true); // is false, 'a' is false, 'span' is true

I've also added another test which uses HTML element so there is now a test for both HTML and SVG.