function shouldFail(p) {
    return p.then(
        () => assert(false, "should fail"),
        () => null // OK!
    )
}
Throws an assertion error if a given promise comes to be fulfilled.

@param {Promise} p - A promise to check.
@returns {Promise} A promise which is checked.