Test a promise for failure
function promiseShouldFail(promise, done, handler) {
    promise.then(result => done(new Error('Promise expected to fail'))).
    catch(error => {
        handler(error)
        done()
    }).
    catch(error => done(error))
}