From 79e4c4a1043f2d0ae00ab22f21e19a83f0b95aa3 Mon Sep 17 00:00:00 2001 From: Pat Cavit Date: Thu, 19 May 2016 22:16:35 -0700 Subject: [PATCH] Remove old testing file (#1061) --- api/tests/test-limiter.js | 69 --------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 api/tests/test-limiter.js diff --git a/api/tests/test-limiter.js b/api/tests/test-limiter.js deleted file mode 100644 index 8d4456ca..00000000 --- a/api/tests/test-limiter.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict" - -var o = require("../../ospec/ospec") -var domMock = require("../../test-utils/domMock") -var async = require("./async") - -var limiter = require("../limiter") - -o.spec("fps limiter", function() { - var $window, root - - void [ - "setTimeout", - "requestAnimationFrame", - ].forEach(function(type) { - o.spec(type, function() { - o.beforeEach(function() { - $window = domMock() - - async[type]($window) - }) - - o("is a function", function() { - o(typeof limiter).equals("function") - }) - - o("it returns a function", function() { - o(typeof limiter($window, false)).equals("function") - }) - - o("it runs synchronously the first time", function() { - var spy = o.spy() - var run = limiter($window, spy) - - run() - - o(spy.callCount).equals(1) - }) - - o("it only runs once per tick", function(done) { - var spy = o.spy() - var run = limiter($window, spy) - - run() - run() - run() - - o(spy.callCount).equals(1) - - setTimeout(function() { - o(spy.callCount).equals(2) - - done() - }, 17) - }) - - o("it supports forcing a synchronous redraw", function() { - var spy = o.spy() - var run = limiter($window, spy) - - run() - run() - run(true) - - o(spy.callCount).equals(2) - }) - }) - }) -})