Closed a-b-r-o-w-n closed 9 years ago
So it appears that there is a bug in that:
var AssertionError = require('assertion-error');
var ChaiAssertionError = require('chai').AssertionError;
var a = new AssertionError();
var c = new ChaiAssertionError();
a instanceof A #> true
c instanceof A #> false
c instanceof C #> true
a instanceof C #> false
In a real chai assertion, chai.AssertionError
is thrown, not AssertionError
. So this doesn't fix the issue yet.
I'm happy. :dog2:
Found the culprit of chai-as-promised never failing. We need to handle
AssertionError
as a normal error an throw.