Skip to content

Commit

Permalink
add an object test (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts authored May 19, 2017
1 parent 672ebab commit 9611b7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,12 @@ test('for attribute is set correctly', function (t) {
t.ok(result.outerHTML.indexOf('<label for="heyo">label</label>') !== -1, 'contains for="heyo"')
t.end()
})

test('allow objects to be passed', function (t) {
t.plan(1)
var result = bel`<div>
<div ${{ foo: 'bar' }}>hey</div>
</div>`
t.ok(result.outerHTML.indexOf('<div foo="bar">hey</div>') !== -1, 'contains foo="bar"')
t.end()
})

0 comments on commit 9611b7f

Please sign in to comment.