Skip to content

Commit

Permalink
add bin script
Browse files Browse the repository at this point in the history
  • Loading branch information
bredele committed Sep 18, 2016
1 parent 293bdbd commit 676f3bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ var vomit = require('..')

tape('should substitute element with an other element content', (test) => {
test.plan(1)
var el = vomit(vomit`<weather><span>Calgary</span></weather>`, vomit`<section><content /></section>`)
console.log(el)
var el = vomit(
vomit`<weather><span>Calgary</span></weather>`,
vomit`<section><content /></section>`
)
test.equal(el.outerHTML, '<section><span>Calgary</span></section>')
})
2 changes: 1 addition & 1 deletion vomit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function(arr, ...args) {
// innerHTML faster?
parent.innerHTML = arr.join('${0}')
el = parent.children[0]
bind(el, args) // children, childNodes?
bind(el, args)
return el
} else {
if(typeof arr == 'function') {
Expand Down

0 comments on commit 676f3bf

Please sign in to comment.