From 57ec042e1a67c4ba93ca33df61377ec740ec44a7 Mon Sep 17 00:00:00 2001 From: Ben Drucker Date: Sun, 3 Jul 2016 17:23:11 -0700 Subject: [PATCH] Add test nesting using sheet router (cov 100!) --- tests/browser/routing.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/browser/routing.js b/tests/browser/routing.js index 53daee6..aa08c84 100644 --- a/tests/browser/routing.js +++ b/tests/browser/routing.js @@ -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() + }) })