javascript - R2D3's QUnit tests fail out of the box - what am I doing wrong? -


i've checked out r2d3 github, , want run tests. new repo, , not expert on js testing, think correct way @ tests/index.html in web browser, , see whether qunit tests pass.

however, when try this, 41 out of 52 tests fail straight out of box (in chrome, firefox , safari on osx):

enter image description here

i can see developer tools files loading correctly, isn't path wrong. looking @ code suggests .append() failing. first 2 errors @ line 16 in tests/core/append-tests.js: var el = svg.append('image') , line 20: var el = svg.append('line').

tracing problem back root in r2d3.v2.js, seems these 2 functions problem:

raphael.fn.appendchild = function(childnode) {   var node = this.buildelement(childnode);   if (node) {     this.shadowdom.appendchild(childnode);     node.updatestyle(); //  apply css styles   }   return node; }; raphael.fn.buildelement = function(childnode) {   var type = childnode && childnode.nodename,       node =  type ? this[type.tolowercase()]() : null;    if (node) {     // ensure paper can referenced sets     node.shadowdom = childnode     node.parentnode = this;     // link shadowdom node raphael id.     node.shadowdom.r2d3 = true;     node.shadowdom.r2d3id = r2d3uid();     node.paper = this;     node.tagname = type.tolowercase();         node.style = new elementstyle(node);      r2d3elements[node.shadowdom.r2d3id] = node;   }   return node; } 

however, ability debug goes no further. can suggest might going wrong?

looks running qunit tests chrome. r2d3 built ie only.


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -