You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
394 B

7 years ago
  1. var Backoff = require('..');
  2. var assert = require('assert');
  3. describe('.duration()', function(){
  4. it('should increase the backoff', function(){
  5. var b = new Backoff;
  6. assert(100 == b.duration());
  7. assert(200 == b.duration());
  8. assert(400 == b.duration());
  9. assert(800 == b.duration());
  10. b.reset();
  11. assert(100 == b.duration());
  12. assert(200 == b.duration());
  13. })
  14. })