Adapt tests for debouncedAsync.
This commit is contained in:
parent
2e6a2ae5d9
commit
879b9d6883
2 changed files with 114 additions and 175 deletions
|
|
@ -285,18 +285,14 @@ o.spec("Router.defineRoutes", function() {
|
|||
})
|
||||
})
|
||||
|
||||
o("replays", function(done) {
|
||||
o("replays", function() {
|
||||
$window.location.href = prefix + "/test"
|
||||
var replay = router.defineRoutes({"/test": {data: 1}}, onRouteChange, onFail)
|
||||
replay()
|
||||
|
||||
callAsync(function() {
|
||||
o(onRouteChange.callCount).equals(2)
|
||||
o(onRouteChange.args).deepEquals([{data: 1}, {}, "/test", "/test"])
|
||||
o(onFail.callCount).equals(0)
|
||||
|
||||
done()
|
||||
})
|
||||
o(onRouteChange.callCount).equals(2)
|
||||
o(onRouteChange.args).deepEquals([{data: 1}, {}, "/test", "/test"])
|
||||
o(onFail.callCount).equals(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue