make setPath always async
This commit is contained in:
parent
520d15a060
commit
e8e0bae726
10 changed files with 154 additions and 61 deletions
|
|
@ -17,6 +17,13 @@ o.spec("Router.defineRoutes", function() {
|
|||
onFail = o.spy()
|
||||
})
|
||||
|
||||
o("calls onRouteChange on init", function() {
|
||||
$window.location.href = prefix + "/a"
|
||||
router.defineRoutes({"/a": {data: 1}}, onRouteChange, onFail)
|
||||
|
||||
o(onRouteChange.callCount).equals(1)
|
||||
})
|
||||
|
||||
o("resolves to route", function() {
|
||||
$window.location.href = prefix + "/test"
|
||||
router.defineRoutes({"/test": {data: 1}}, onRouteChange, onFail)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue