Assert that tree exists, fix tests (#358)

* assert that tree exists, fix tests

* make assertions more helpful
This commit is contained in:
Tim Wisniewski
2016-12-22 06:55:36 -05:00
committed by GitHub
parent ff1073a664
commit 3b5740c00e
4 changed files with 12 additions and 20 deletions
+2
View File
@@ -64,6 +64,8 @@ function choo (opts) {
const state = _store.state({state: {}})
const tree = _router(state.location.href, state)
assert.ok(tree, 'choo.start: the router should always return a valid DOM node')
assert.equal(typeof tree, 'object', 'choo.start: the router should always return a valid DOM node')
_rootNode = tree
tree.done = done