Mocha Cooldown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var apitest = module.exports = {}; | |
/** | |
* Have a Cooldown period between tests. | |
* | |
* @param {number} seconds cooldown in seconds. | |
* @return {Function} use is beforeEach(). | |
*/ | |
apitest.cooldown = function(seconds) { | |
return function(done) { | |
setTimeout(done, seconds); | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach(apitest.cooldown(1000)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment