Skip to content Skip to sidebar Skip to footer
Showing posts with the label Promise

Mocha Tests Using Superagent + Promises Timeout Rather Than Fail With 'expect'

I'm using mocha to run a number of integration tests against an external web service. I use sup… Read more Mocha Tests Using Superagent + Promises Timeout Rather Than Fail With 'expect'

How To Export The Response Data Obtained From A Get Api Using Fetch From One Module To Another

Code Snippet: let data ={}; zlFetch('http://localhost:3000/new.json') .then(respon… Read more How To Export The Response Data Obtained From A Get Api Using Fetch From One Module To Another

How Can I Pass Mochas Done Callback Function To Another Helper Function

I have a block of code that I will be using several times within a then statement in mocha so I tur… Read more How Can I Pass Mochas Done Callback Function To Another Helper Function

Bluebird Promise Is Undefined?

I'm using node 4.5+ and bluebird. I have the following code I intend to use with then: var chec… Read more Bluebird Promise Is Undefined?

I'm Doing Promises Better, But Still Kind Of Wrong... One More Thing To Clear Up

I asked a question about JS Promises in this post: I'm doing Promises wrong... What am I missin… Read more I'm Doing Promises Better, But Still Kind Of Wrong... One More Thing To Clear Up

Should I Always Return Promises In All Functions In Javascript?

I am thinking could it be a good approach to always return promises in functions in JavaScript? Let… Read more Should I Always Return Promises In All Functions In Javascript?