mirror of
https://github.com/chaijs/chai
synced 2024-11-15 00:07:11 +00:00
chai.fail no longer exists
This commit is contained in:
parent
e0fec477da
commit
7890dc6aa6
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue