m.route tests should run against all prefixes

Also tests `router.link` now. Had to add a `preventDefault` function to
domMock events that doesn't do anything, that may need a more-complete
implementation someday?
This commit is contained in:
Pat Cavit 2016-05-19 00:09:20 -07:00 committed by Pat Cavit
parent 89dfd6e97d
commit 41b24b998a
2 changed files with 166 additions and 81 deletions

View file

@ -173,6 +173,9 @@ module.exports = function() {
events[e.type][i].call(this, e)
}
}
e.preventDefault = function() {
// TODO: should this do something?
}
if (typeof this["on" + e.type] === "function" && !isModernEvent(e.type)) this["on" + e.type](e)
},
}