function promiseShouldSucceed(promise, done, handler) {
    promise.then(result => {
        handler(result)
        done()
    }).
    catch(error => done(error))
}
function promiseShouldSucceed(promise, done, handler) {
    promise.then(result => {
        handler(result)
        done()
    }).
    catch(error => done(error))
}
function promiseShouldSucceed ( promise , done , handler ) { promise . then ( result => { handler ( result ) done ( ) } ) . catch ( error => done ( error ) ) }
Test a promise for success
Test a promise for success