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

Adds Node 8 to CI #328

Merged
merged 2 commits into from
Jun 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ node_js:
- "5"
- "6"
- "7"
- "8"
script: npm run test-full
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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not be concerned that someone using this assertion library wouldn't work with Raven in Node 8?

Copy link
Contributor Author

@LewisJEllis LewisJEllis Jun 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll still work, it just makes the property name AssertionError [ERR_ASSERTION] instead of simply AssertionError because of some new error code stuff (for error "subtypes") in node 8 (...that is sort of WIP and not entirely documented AFAICT :/). I didn't want to branch on version so I just fell back to something that checks extra property without "subtype"ing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Let's move forward.

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