|
,"tests":[{"id":1,"name":["on()","should throw an error on no input."]},{"id":2,"name":["on()","should expose an on.dom function after the first call."]},{"id":3,"name":["on()","should expose an on.query function after the first call."]},{"id":4,"name":["on()","should expose an on.path_re function after the first call."]},{"id":5,"name":["on()","should accept an object with \"path_re\", \"dom\", and/or \"query\" specs."]},{"id":6,"name":["on.dom(dom spec – see below for the three types of dom spec)","should be a function after the first on() call."]},{"id":7,"name":["on.dom(dom spec – see below for the three types of dom spec)","should expose on.dom.* functions once on.dom() has run once."]},{"id":8,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","Array of Node:s (0+ occurrences):","on.dom(\"css* NotFound\") => []."]},{"id":9,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","Array of Node:s (0+ occurrences):","on.dom(\"css* html\") => [html]."]},{"id":10,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","Array of Node:s (0+ occurrences):","on.dom(\"css* *\") => document.all (but as a proper Array)."]},{"id":11,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","Array of Node:s (1+ occurrences):","on.dom(\"css+ html\") => [html]."]},{"id":12,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","Array of Node:s (1+ occurrences):","on.dom(\"css+ NotFound\") => undefined."]},{"id":13,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","single optional Node, or null if not found:","on.dom(\"css? *\") => root element (= first match)."]},{"id":14,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","single optional Node, or null if not found:","on.dom(\"css? NotFound\") => null (not found)."]},{"id":15,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","single mandatory Node:","on.dom(\"css *\") => the root element."]},{"id":16,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"css… selection\"): Array/Node, optional/not?","single mandatory Node:","on.dom(\"css NotFound\") => undefined (unsatisfied)."]},{"id":17,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath* => Array of Node:s (0+ occurrences):","on.dom(\"xpath* /*\") => [root element]."]},{"id":18,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath* => Array of Node:s (0+ occurrences):","on.dom(\"xpath* /NotFound\") => []."]},{"id":19,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath+ => Array of Node:s (1+ occurrences):","on.dom(\"xpath+ /*\") => [root element]."]},{"id":20,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath+ => Array of Node:s (1+ occurrences):","on.dom(\"xpath+ /NotFound\") => undefined."]},{"id":21,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath? => single optional Node, or null if missing:","on.dom(\"xpath? /NotFound\") => null."]},{"id":22,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath? => single optional Node, or null if missing:","on.dom(\"xpath? /*\") => the root element."]},{"id":23,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath => single mandatory Node:","on.dom(\"xpath /*\") => the root element."]},{"id":24,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath => single mandatory Node:","on.dom(\"xpath /NotFound\") => undefined."]},{"id":25,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath => single mandatory Node:","on.dom(\"xpath .\") => the current document."]},{"id":26,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","…or queries yielding Number/String/Boolean answers:","on.dom(\"xpath count(/)\") => 1."]},{"id":27,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","…or queries yielding Number/String/Boolean answers:","on.dom(\"xpath count(/NotFound)\") => 0."]},{"id":28,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","…or queries yielding Number/String/Boolean answers:","on.dom(\"xpath name(/*)\") => \"html\" or \"HTML\"."]},{"id":29,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","…or queries yielding Number/String/Boolean answers:","on.dom(\"xpath name(/)\") => \"\"."]},{"id":30,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","…or queries yielding Number/String/Boolean answers:","on.dom(\"xpath count(/*) = 1\") => true."]},{"id":31,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","…or queries yielding Number/String/Boolean answers:","on.dom(\"xpath name(/*) = 'nope'\") => false."]},{"id":32,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath! makes assertions, requiring truthy answers:","on.dom(\"xpath! count(/)\") => 1."]},{"id":33,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath! makes assertions, requiring truthy answers:","on.dom(\"xpath! count(/NotFound)\") => undefined."]},{"id":34,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath! makes assertions, requiring truthy answers:","on.dom(\"xpath! name(/*)\") => \"html\"."]},{"id":35,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath! makes assertions, requiring truthy answers:","on.dom(\"xpath! name(/)\") => undefined."]},{"id":36,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath! makes assertions, requiring truthy answers:","on.dom(\"xpath! count(/*) = 1\") => true."]},{"id":37,"name":["on.dom(dom spec type 1: a selector string)","on.dom(\"xpath… selection\"): Array/Node, optional/not?","xpath! makes assertions, requiring truthy answers:","on.dom(\"xpath! name(/*) = 'nope'\") => undefined."]},{"id":38,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({}) => {} (fairly useless, but minimal, test case)."]},{"id":39,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ h:\"css head\", H:\"css html\" }) => { h:head, H:html }."]},{"id":40,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ h:\"css head\", f:\"css? foot\" }) => { h:head, f:null }."]},{"id":41,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ h:\"css head\", f:\"css foot\" }) => undefined (no foot!)."]},{"id":42,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ x:\"css* frame\" }) => { x:[] } (frames optional here)."]},{"id":43,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ x:\"css+ frame\" }) => undefined (but mandatory here!)."]},{"id":44,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ x:\"css* script\" }) => { x:[…all (>=0) script tags…] }."]},{"id":45,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ x:\"css+ script\" }) => { x:[…all (>0) script tags…] }."]},{"id":46,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ c:\"xpath count(//script)\" }) => {c:N} (any N is okay)."]},{"id":47,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ c:\"xpath! count(//script)\" }) => {c:N} (only N!=0 ok)."]},{"id":48,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ c:\"xpath! count(//missing)\" }) => undefined (as N==0)."]},{"id":49,"name":["on.dom(dom spec type 2: an object showing the structure you want)","on.dom({ c:\"xpath! count(//*) and /html\" }) => { c:true }."]},{"id":50,"name":["on.dom(dom spec type 3: [context_spec, per_match_spec])","on.dom([\"css* script[src]\", \"xpath string(@src)\"]) => [\"url\"…]."]},{"id":51,"name":["on.dom(dom spec type 3: [context_spec, per_match_spec])","on.dom([\"css? script:not([src])\", \"xpath string(.)\"]) => \"js…\"."]},{"id":52,"name":["on.dom(dom spec type 3: [context_spec, per_match_spec])","on.dom([\"css? script:not([src])\", \"xpath! string(@src)\"]) => undefined (empty string is not truthy => not a match)."]},{"id":53,"name":["on.dom(dom spec type 3: [context_spec, per_match_spec])","on.dom([\"xpath /svg\", \"css* *\"]) => undefined (not an svg doc)."]},{"id":54,"name":["on.dom(dom spec type 3: [context_spec, per_match_spec])","on.dom([html, \"xpath .\"]) => html."]},{"id":55,"name":["on.dom(dom spec type 3: [context_spec, per_match_spec])","on.dom([[head, html], \"xpath .\"]) => [head, html]."]},{"id":56,"name":["on.dom plugins:","on( { dom: \"my_plugin\", ready: ready = (x) -> } , { dom: \"my_plugin\": -> document.body } ) => ready(document.body)."]},{"id":57,"name":["on.dom plugins:","on.dom([\"my_plugin\", \"xpath .\"]) => body."]},{"id":58,"name":["on.dom plugins:","on.dom([\"my_plugin\", \"xpath ..\"]) => html."]},{"id":59,"name":["on.dom plugins:","on.dom(\"xpath .\") => document."]},{"id":60,"name":["on.query","should be a function after the first on() call."]},{"id":61,"name":["on.query","on.query() => {} for a missing query string."]},{"id":62,"name":["on.query","on.query() => {} for an empty query string (\"?\")."]},{"id":63,"name":["on.query","on.query() => { a:\"\", x:\"0\" } for a query string \"?a=&x=0\"."]},{"id":64,"name":["on.query","on.query() => { ugh:undefined } for a query string \"?ugh\"."]}] |
|
,"results":[[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[{"id":17,"message":"Expected [ HTMLNode ] to equal [ HTMLNode, 1 ].","stacktrace":" Error: Expected [ HTMLNode ] to equal [ HTMLNode, 1 ].\n at new jasmine.ExpectationResult (http://localhost:7357/testem/jasmine.js:102:32)\n at null.toEqual (http://localhost:7357/testem/jasmine.js:1194:29)\n at null.<anonymous> (http://localhost:7357/tests/on.dom.js:113:46)\n at jasmine.Block.execute (http://localhost:7357/testem/jasmine.js:1024:15)\n at jasmine.Queue.next_ (http://localhost:7357/testem/jasmine.js:2025:31)\n at jasmine.Queue.start (http://localhost:7357/testem/jasmine.js:1978:8)\n at jasmine.Spec.execute (http://localhost:7357/testem/jasmine.js:2305:14)\n at jasmine.Queue.next_ (http://localhost:7357/testem/jasmine.js:2025:31)\n at jasmine.Queue.start (http://localhost:7357/testem/jasmine.js:1978:8)\n at jasmine.Suite.execute (http://localhost:7357/testem/jasmine.js:2450:14)\n ...\n"},{"id":81,"message":"Expected [ HTMLNode ] to equal [ HTMLNode, 1 ].","stacktrace":" ([object Object])@http://localhost:7357/testem/jasmine.js:102\n ([object Array])@http://localhost:7357/testem/jasmine.js:1199\n ()@http://localhost:7357/tests/on.dom.js:113\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:1024\n ()@http://localhost:7357/testem/jasmine.js:2025\n ((function () {spec.finish(onComplete);}))@http://localhost:7357/testem/jasmine.js:1978\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:2305\n ()@http://localhost:7357/testem/jasmine.js:2025\n ((function () {self.finish(onComplete);}))@http://localhost:7357/testem/jasmine.js:1978\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:2450\n ()@http://localhost:7357/testem/jasmine.js:2025\n ((function () {self.finish(onComplete);}))@http://localhost:7357/testem/jasmine.js:1978\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:2450\n ()@http://localhost:7357/testem/jasmine.js:2025\n ((function () {self.finish(onComplete);}))@http://localhost:7357/testem/jasmine.js:1978\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:2450\n ()@http://localhost:7357/testem/jasmine.js:2025\n ()@http://localhost:7357/testem/jasmine.js:2021\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:2407\n ()@http://localhost:7357/testem/jasmine.js:2451\n ()@http://localhost:7357/testem/jasmine.js:2035\n ()@http://localhost:7357/testem/jasmine.js:2021\n ((function () {if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {completedSynchronously = true;return;}if (self.blocks[self.index].abort) {self.abort = true;}self.offset = 0;self.index++;var now = (new Date).getTime();if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {self.env.lastUpdate = now;self.env.setTimeout(function () {self.next_();}, 0);} else {if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {goAgain = true;} else {self.next_();}}}))@http://localhost:7357/testem/jasmine.js:2279\n ()@http://localhost:7357/testem/jasmine.js:2306\n ()@http://localhost:7357/testem/jasmine.js:2035\n ()@http://localhost:7357/testem/jasmine.js:2015\n ...\n"},{"id":145,"message":"Expected [ HTMLNode ] to equal [ HTMLNode, 1 ]."},{"id":209,"message":"Expected [ HTMLNode ] to equal [ HTMLNode, 1 ].","stacktrace":" test_dom([arguments not available])@http://localhost:7357/on.js:376\n <anonymous function>([arguments not available])@http://localhost:7357/tests/on.dom.js:59\n <anonymous function: jasmine.Block.prototype.execute>([arguments not available])@http://localhost:7357/testem/jasmine.js:1024\n <anonymous function: jasmine.Queue.prototype.next_>([arguments not available])@http://localhost:7357/testem/jasmine.js:2025\n <anonymous function: jasmine.Queue.prototype.start>([arguments not available])@http://localhost:7357/testem/jasmine.js:1978\n <anonymous function: jasmine.Spec.prototype.execute>([arguments not available])@http://localhost:7357/testem/jasmine.js:2305\n <anonymous function: jasmine.Queue.prototype.next_>([arguments not available])@http://localhost:7357/testem/jasmine.js:2025\n <anonymous function: jasmine.Queue.prototype.start>([arguments not available])@http://localhost:7357/testem/jasmine.js:1978\n <anonymous function: jasmine.Suite.prototype.execute>([arguments not available])@http://localhost:7357/testem/jasmine.js:2450\n <anonymous function: jasmine.Queue.prototype.next_>([arguments not available])@http://localhost:7357/testem/jasmine.js:2025\n \n Error created at <anonymous function: jasmine.ExpectationResult>([arguments not available])@http://localhost:7357/testem/jasmine.js:102\n <anonymous function: jasmine.Matchers.matcherFn_>([arguments not available])@http://localhost:7357/testem/jasmine.js:1194\n <anonymous function>([arguments not available])@http://localhost:7357/tests/on.dom.js:113\n <anonymous function: jasmine.Block.prototype.execute>([arguments not available])@http://localhost:7357/testem/jasmine.js:1024\n <anonymous function: jasmine.Queue.prototype.next_>([arguments not available])@http://localhost:7357/testem/jasmine.js:2025\n <anonymous function: jasmine.Queue.prototype.start>([arguments not available])@http://localhost:7357/testem/jasmine.js:1978\n <anonymous function: jasmine.Spec.prototype.execute>([arguments not available])@http://localhost:7357/testem/jasmine.js:2305\n <anonymous function: jasmine.Queue.prototype.next_>([arguments not available])@http://localhost:7357/testem/jasmine.js:2025\n <anonymous function: jasmine.Queue.prototype.start>([arguments not available])@http://localhost:7357/testem/jasmine.js:1978\n <anonymous function: jasmine.Suite.prototype.execute>([arguments not available])@http://localhost:7357/testem/jasmine.js:2450\n ...\n"},{"id":273,"message":"Expected [ HTMLNode ] to equal [ HTMLNode, 1 ]."}],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]] |