This commit is contained in:
Pierre-Yves Gérardy 2017-06-14 00:15:08 +02:00
parent 47d59ea68a
commit 0e0ed7c45d
5 changed files with 88 additions and 86 deletions

View file

@ -11,7 +11,6 @@ var apiRedraw = require("../../api/redraw")
var apiMounter = require("../../api/mount") var apiMounter = require("../../api/mount")
o.spec("mount", function() { o.spec("mount", function() {
var FRAME_BUDGET = Math.floor(1000 / 60)
var $window, root, redrawService, mount, render, throttleMock var $window, root, redrawService, mount, render, throttleMock
o.beforeEach(function() { o.beforeEach(function() {

View file

@ -15,7 +15,6 @@ o.spec("route", function() {
void [{protocol: "http:", hostname: "localhost"}, {protocol: "file:", hostname: "/"}].forEach(function(env) { void [{protocol: "http:", hostname: "localhost"}, {protocol: "file:", hostname: "/"}].forEach(function(env) {
void ["#", "?", "", "#!", "?!", "/foo"].forEach(function(prefix) { void ["#", "?", "", "#!", "?!", "/foo"].forEach(function(prefix) {
o.spec("using prefix `" + prefix + "` starting on " + env.protocol + "//" + env.hostname, function() { o.spec("using prefix `" + prefix + "` starting on " + env.protocol + "//" + env.hostname, function() {
var FRAME_BUDGET = Math.floor(1000 / 60)
var $window, root, redrawService, route, throttleMock var $window, root, redrawService, route, throttleMock
o.beforeEach(function() { o.beforeEach(function() {
@ -552,12 +551,12 @@ o.spec("route", function() {
route(root, "/a", { route(root, "/a", {
"/a" : { "/a" : {
render: function() { render: function() {
return m("div", m('p')) return m("div", m("p"))
}, },
}, },
"/b" : { "/b" : {
render: function() { render: function() {
return m("div", m('a')) return m("div", m("a"))
}, },
}, },
}) })
@ -840,7 +839,7 @@ o.spec("route", function() {
callAsync(function() { callAsync(function() {
throttleMock.fire() throttleMock.fire()
route.set('/b') route.set("/b")
callAsync(function() { callAsync(function() {
callAsync(function() { callAsync(function() {
callAsync(function() { callAsync(function() {
@ -1110,7 +1109,7 @@ o.spec("route", function() {
o(root.firstChild.nodeName).equals("B") o(root.firstChild.nodeName).equals("B")
route.set('/a') route.set("/a")
callAsync(function() { callAsync(function() {
throttleMock.fire() throttleMock.fire()

View file

@ -1,3 +1,5 @@
"use strict"
var o = require("../../ospec/ospec") var o = require("../../ospec/ospec")
var throttleMocker = require("../../test-utils/throttleMock") var throttleMocker = require("../../test-utils/throttleMock")

View file

@ -1,3 +1,5 @@
"use strict"
module.exports = function() { module.exports = function() {
var queue = [] var queue = []
return { return {