Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Fix additional error properties test for Node. 8 error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
LewisJEllis committed Jun 6, 2017
1 parent 7c5b750 commit 46440a3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/raven.parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,19 +601,17 @@ describe('raven.parsers', function () {

it('should parse an error with additional information', function (done) {
try {
assert.strictEqual(1, 2);
var err = new Error('boom');
err.prop = 'value';
throw err;
} catch (e) {
raven.parsers.parseError(e, {}, function (parsed) {
parsed.should.have.property('exception');
parsed.exception[0].stacktrace.should.have.property('frames');
parsed.should.have.property('extra');
parsed.extra.should.have.property('AssertionError');
parsed.extra.AssertionError.should.have.property('actual');
parsed.extra.AssertionError.actual.should.equal(1);
parsed.extra.AssertionError.should.have.property('expected');
parsed.extra.AssertionError.expected.should.equal(2);
parsed.extra.AssertionError.should.have.property('operator');
parsed.extra.AssertionError.operator.should.equal('===');
parsed.extra.should.have.property('Error');
parsed.extra.Error.should.have.property('prop');
parsed.extra.Error.prop.should.equal('value');
done();
});
}
Expand Down

0 comments on commit 46440a3

Please sign in to comment.