This commit is contained in:
Leo 2016-12-23 08:52:09 -05:00
parent befc1e6d1a
commit d42d728681

View file

@ -78,7 +78,7 @@ o.spec("route", function() {
callAsync(function() { callAsync(function() {
o(root.firstChild.nodeName).equals("DIV") o(root.firstChild.nodeName).equals("DIV")
o($window.location.pathname).equals("/a") o(route.get()).equals("/a")
$window.history.back() $window.history.back()
@ -576,7 +576,7 @@ o.spec("route", function() {
o(matchCount).equals(1) o(matchCount).equals(1)
o(renderCount).equals(2) o(renderCount).equals(2)
done() done()
}) })
}) })
@ -611,7 +611,7 @@ o.spec("route", function() {
o(matchCount).equals(1) o(matchCount).equals(1)
o(renderCount).equals(2) o(renderCount).equals(2)
done() done()
}) })
}) })
@ -619,7 +619,7 @@ o.spec("route", function() {
o("onmatch can redirect to another route", function(done) { o("onmatch can redirect to another route", function(done) {
var redirected = false var redirected = false
var render = o.spy() var render = o.spy()
$window.location.href = prefix + "/a" $window.location.href = prefix + "/a"
route(root, "/a", { route(root, "/a", {
"/a" : { "/a" : {
@ -970,7 +970,7 @@ o.spec("route", function() {
o(renderA.callCount).equals(0) o(renderA.callCount).equals(0)
o(renderB.callCount).equals(1) o(renderB.callCount).equals(1)
done() done()
}) })
}, 20) }, 20)
}) })
@ -1192,19 +1192,19 @@ o.spec("route", function() {
} }
}, },
}) })
callAsync(function() { // tick for popstate for /a callAsync(function() { // tick for popstate for /a
callAsync(function() { // tick for promise in onmatch callAsync(function() { // tick for promise in onmatch
callAsync(function() { // tick for onpopstate for /b callAsync(function() { // tick for onpopstate for /b
o(rendered).equals(false) o(rendered).equals(false)
o(resolved).equals("b") o(resolved).equals("b")
done() done()
}) })
}) })
}) })
}) })
o("throttles", function(done, timeout) { o("throttles", function(done, timeout) {
timeout(200) timeout(200)