More updates to stop using dev or alpha or beta versions.
[yaffs-website] / node_modules / phridge / test / helpers / slow.js
1 "use strict";
2
3 /**
4  * @param {function} fn
5  * @returns {function}
6  */
7 function slow(fn) {
8     if (fn.length === 1) {
9         /**
10          * @this Runner
11          * @param {function} done
12          * @returns {*}
13          */
14         return function (done) {
15             this.slow(2000);
16             this.timeout(15000);
17             return fn.apply(this, arguments);
18         };
19     }
20     /**
21      * @this Runner
22      * @returns {*}
23      */
24     return function () {
25         this.slow(2000);
26         this.timeout(15000);
27         return fn.apply(this, arguments);
28     };
29 }
30
31 module.exports = slow;