socketioMEANseed/server/node_modules/backo2/test/index.js
server/node_modules/backo2/test/index.jsRaw
1
2var Backoff = require('..');
3var assert = require('assert');
4
5describe('.duration()', function(){
6 it('should increase the backoff', function(){
7 var b = new Backoff;
8
9 assert(100 == b.duration());
10 assert(200 == b.duration());
11 assert(400 == b.duration());
12 assert(800 == b.duration());
13
14 b.reset();
15 assert(100 == b.duration());
16 assert(200 == b.duration());
17 })
18})