chai.fail no longer exists

This commit is contained in:
Jake Luer 2012-03-14 16:52:41 -04:00
parent e0fec477da
commit 7890dc6aa6
3 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ var assert = chai.assert;
function err(fn, msg) {
try {
fn();
chai.fail('expected an error');
throw new chai.AssertionError({ message: 'Expected an error' });
} catch (err) {
assert.equal(msg, err.message);
}

View file

@ -13,7 +13,7 @@ var expect = chai.expect;
function err(fn, msg) {
try {
fn();
chai.fail('expected an error');
throw new chai.AssertionError({ message: 'Expected an error' });
} catch (err) {
expect(msg).to.equal(err.message);
}

View file

@ -12,7 +12,7 @@ var should = chai.should();
function err(fn, msg) {
try {
fn();
chai.fail('expected an error');
throw new chai.AssertionError({ message: 'Expected an error' });
} catch (err) {
should.equal(msg, err.message);
}