mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-10-30 21:58:32 +00:00 
			
		
		
		
	update
This commit is contained in:
		
							
								
								
									
										18
									
								
								node_modules/backo2/test/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/backo2/test/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
|  | ||||
| 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()); | ||||
|   }) | ||||
| }) | ||||
		Reference in New Issue
	
	Block a user
	 tatianamac
					tatianamac