node_modules
.bin
accepts
after
array-flatten
arraybuffer.slice
async-limiter
backo2
test
index.js
.npmignore
History.md
Makefile
Readme.md
component.json
index.js
package.json
base64-arraybuffer
base64id
better-assert
blob
callsite
component-bind
component-emitter
component-inherit
content-disposition
content-type
cookie
cookie-signature
debug
depd
destroy
ee-first
encodeurl
engine.io
engine.io-client
engine.io-parser
escape-html
etag
express
finalhandler
forwarded
fresh
has-binary2
has-cors
http-errors
indexof
inherits
ipaddr.js
isarray
media-typer
merge-descriptors
methods
mime
mime-db
mime-types
ms
negotiator
net
object-component
on-finished
parseqs
parseuri
parseurl
path-to-regexp
proxy-addr
qs
range-parser
safe-buffer
send
serve-static
setprototypeof
socket.io
socket.io-adapter
socket.io-client
socket.io-parser
statuses
to-array
type-is
ultron
unpipe
utils-merge
vary
ws
xmlhttprequest-ssl
yeast
public
README.md
index.js
package-lock.json
package.json
18 lines
394 B
JavaScript
18 lines
394 B
JavaScript
|
|
var Backoff = require('..');
|
|
var assert = require('assert');
|
|
|
|
describe('.duration()', function(){
|
|
it('should increase the backoff', function(){
|
|
var b = new Backoff;
|
|
|
|
assert(100 == b.duration());
|
|
assert(200 == b.duration());
|
|
assert(400 == b.duration());
|
|
assert(800 == b.duration());
|
|
|
|
b.reset();
|
|
assert(100 == b.duration());
|
|
assert(200 == b.duration());
|
|
})
|
|
}) |