File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
packages/jest-jasmine2/src/jasmine Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3131/* @flow */
3232/* eslint-disable sort-keys */
3333
34- import { AssertionError } from 'assert' ;
35-
3634import ExpectationFailed from '../expectation_failed' ;
3735
3836import expectationResultFactory from '../expectation_result_factory' ;
@@ -148,12 +146,12 @@ Spec.prototype.onException = function onException(error) {
148146 return ;
149147 }
150148
151- if ( error instanceof ExpectationFailed ) {
152- return ;
149+ if ( error && error . code === 'ERR_ASSERTION' ) {
150+ error = assertionErrorMessage ( error , { expand : this . expand } ) ;
153151 }
154152
155- if ( error instanceof AssertionError ) {
156- error = assertionErrorMessage ( error , { expand : this . expand } ) ;
153+ if ( error instanceof ExpectationFailed ) {
154+ return ;
157155 }
158156
159157 this . addExpectationResult (
You can’t perform that action at this time.
0 commit comments