Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 1.1 KB

README.md

File metadata and controls

25 lines (15 loc) · 1.1 KB

bug-fixes

##To run tests

  1. $ npm install
  2. $ npm run test

##To run exponential backoff

$ node backoff/backoff.js

###Question 1

The issue here was that if doThing erred, then the callback was called twice as the function did not return. I implemented doThing to err and I added the return statement. I have implemented a test to check that the callback is only called once.

###Question 2

The issue here was that callOneService and callTwoService are asynchronous calls and were not called in sequence. I changed the code to call the callbacks in sequence and have created a test

###Question 3

I have implemented the exponentialBack function.