Add test nesting using sheet router (cov 100!)

This commit is contained in:
Ben Drucker
2016-07-04 16:19:17 -07:00
parent 04b9e0efd2
commit 57ec042e1a
+17
View File
@@ -145,4 +145,21 @@ test('routing', function (t) {
app.start({href: false})
})
t.test('viewless nesting', function (t) {
t.plan(1)
const choo = require('../..')
const app = choo()
app.router('/users/123', (route) => [
route('/users', [
route('/:user', function (state) {
t.deepEqual(state.params, {user: '123'})
})
])
])
app.start()
})
})