Skip to content

Commit

Permalink
Added a test for nested children
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Caldwell committed Aug 27, 2015
1 parent 19ba755 commit ae79806
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/basic.js
Expand Up @@ -38,3 +38,19 @@ test('with text', function (t) {
t.equal(tag._store.props.children[0], 'Hello, World!', 'text is correct')
})
})

test('depth of two', function (t) {
t.plan(2)
render(function (el) {
el.append('p')
.prop('key', 'one')
.append('p')
.prop('key', 'two')
}, function (result) {
var one = result._store.props.children[0]
var two = one._store.props.children[0]

t.equal(one.key, 'one', 'the first exists')
t.equal(two.key, 'two', 'the second exists')
})
})

0 comments on commit ae79806

Please sign in to comment.