Test both async types when using router
This commit is contained in:
parent
37b0ce20c5
commit
749ff74bea
1 changed files with 167 additions and 160 deletions
|
|
@ -11,6 +11,11 @@ var createRouter = require("../router")
|
|||
o.spec("m.route", function() {
|
||||
var $window, root, router
|
||||
|
||||
[
|
||||
"setTimeout",
|
||||
"requestAnimationFrame"
|
||||
].forEach(function(timing) {
|
||||
o.spec(timing, function() {
|
||||
[
|
||||
"#",
|
||||
"?",
|
||||
|
|
@ -31,7 +36,7 @@ o.spec("m.route", function() {
|
|||
})
|
||||
|
||||
$window = dom
|
||||
async.setTimeout($window)
|
||||
async[timing]($window)
|
||||
root = $window.document.body
|
||||
})
|
||||
|
||||
|
|
@ -180,3 +185,5 @@ o.spec("m.route", function() {
|
|||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue