more router tests

This commit is contained in:
Leo Horie 2016-08-12 23:56:17 -04:00
parent 9c16ece556
commit 68331065b7
2 changed files with 55 additions and 19 deletions

View file

@ -7,7 +7,7 @@ var autoredraw = require("../api/autoredraw")
module.exports = function($window, renderer, pubsub) {
var router = coreRouter($window)
var route = function(root, defaultRoute, routes) {
var current = {path: null, component: null}
var current = {path: null, component: "div"}
var replay = router.defineRoutes(routes, function(payload, args, path, route) {
if (typeof payload.view !== "function") {
if (typeof payload.render !== "function") payload.render = function(vnode) {return vnode}