function Assert_rejects(promise, message) {
  let deferred = Promise.defer();
  promise.then(
    () => deferred.reject(message || "Expected the promise to be rejected"),
    deferred.resolve
  );
  return deferred.promise;
}
// Maybe as Assert.rejects - so we name it like that.

Maybe as Assert.rejects - so we name it like that.
Maybe as Assert . rejects - so we name it like that .
function Assert_rejects(promise, message) {
  let deferred = Promise.defer();
  promise.then(
    () => deferred.reject(message || "Expected the promise to be rejected"),
    deferred.resolve
  );
  return deferred.promise;
}
function Assert_rejects ( promise , message ) { let deferred = Promise . defer ( ) ; promise . then ( ( ) => deferred . reject ( message || "Expected the promise to be rejected" ) , deferred . resolve ) ; return deferred . promise ; }
Maybe as Assert.rejects - so we name it like that.
Maybe as Assert . rejects - so we name it like that .