Skip to content
This repository has been archived by the owner on Mar 13, 2019. It is now read-only.

Commit

Permalink
Added missing unit test, fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Mar 14, 2013
1 parent 4d4dc25 commit 7582e28
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/standard_features.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ TestCase('Standard', {
'test callback function': function () {
/*:DOC gen = <div></div>*/

var bar, element
var bar = false,
element = false

function foo(el) {
bar = true
Expand Down Expand Up @@ -81,5 +82,14 @@ TestCase('Standard', {

assertEquals('Should return element', document.getElementById('foo'), fragment.foo)
assertEquals('Should return element', document.getElementById('bar'), fragment.bar)
},

'test return of marked elements ': function () {
/*:DOC += <div id="gen"></div>*/

var fragment = DOMinate([document.getElementById('gen'), ['a$foo'], ['p$bar']])

assertEquals('Should return element', document.getElementsByTagName('a')[0], fragment.foo)
assertEquals('Should return element', document.getElementsByTagName('p')[0], fragment.bar)
}
})

0 comments on commit 7582e28

Please sign in to comment.