index.js 394 B

123456789101112131415161718
  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. })