Skip to content

Commit

Permalink
should wrap functions
Browse files Browse the repository at this point in the history
bredele committed Sep 3, 2016
1 parent 34cc8cf commit e79cfc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/vomit.js
Original file line number Diff line number Diff line change
@@ -19,3 +19,12 @@ tape('should create multiple elements', (test) => {
var section = vomit`<section><button>${label}</button></section>`
test.equal(section.outerHTML, '<section><button>hello</button></section>')
})


tape('should wrap function', (test) => {
test.plan(1)
var btn = vomit(function(data) {
return vomit`<button>${data}</button>`
})
test.equal(btn('hello').outerHTML, '<button>hello</button>')
})

0 comments on commit e79cfc6

Please sign in to comment.