Skip to content

Commit

Permalink
Change with keyword to fix #13
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsgroen committed Jan 11, 2013
1 parent 234bbc3 commit 4956db0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/chai-as-promised.js
Expand Up @@ -363,7 +363,9 @@
}

var shouldBeRejectedPromise = (new Assertion(promise, message)).to.be.rejected;
return toTestAgainst ? shouldBeRejectedPromise.with(toTestAgainst) : shouldBeRejectedPromise;
// 'with' is a special keyword in ECMA-262
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/with
return toTestAgainst ? shouldBeRejectedPromise['with'](toTestAgainst) : shouldBeRejectedPromise;
};

assert.eventually = {};
Expand Down

0 comments on commit 4956db0

Please sign in to comment.