Skip to content

Commit 6373464

Browse files
committed
2.6.1 [fixed node10 tests]
1 parent f786fcf commit 6373464

File tree

3 files changed

+20
-23
lines changed

3 files changed

+20
-23
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"raven": "./bin/raven"
2020
},
2121
"scripts": {
22-
"lint": "node_modules/eslint/bin/eslint.js .",
22+
"lint": "eslint . --quiet",
2323
"precommit": "lint-staged",
2424
"pretest": "npm install && npm run lint",
25-
"test": "NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test node_modules/coffee-script/bin/coffee ./test/run.coffee",
25+
"test": "NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test coffee ./test/run.coffee",
2626
"test-mocha": "NODE_ENV=test mocha",
2727
"test-full": "npm run test && cd test/instrumentation && ./run.sh"
2828
},

test/raven.client.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ describe('raven.Client', function() {
353353
.filteringRequestBody(/.*/, '*')
354354
.post('/api/269/store/', '*')
355355
.reply(200, function(uri, body) {
356-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
356+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
357357
if (err) return done(err);
358358
var msg = JSON.parse(dec.toString());
359359

@@ -463,7 +463,7 @@ describe('raven.Client', function() {
463463
.filteringRequestBody(/.*/, '*')
464464
.post('/api/269/store/', '*')
465465
.reply(200, function(uri, body) {
466-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
466+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
467467
if (err) return done(err);
468468
var msg = JSON.parse(dec.toString());
469469

@@ -654,7 +654,7 @@ describe('raven.Client', function() {
654654
.filteringRequestBody(/.*/, '*')
655655
.post('/api/269/store/', '*')
656656
.reply(200, function(uri, body) {
657-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
657+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
658658
if (err) return done(err);
659659
var msg = JSON.parse(dec.toString());
660660
var extra = msg.extra;
@@ -745,7 +745,7 @@ describe('raven.Client', function() {
745745
.filteringRequestBody(/.*/, '*')
746746
.post('/api/269/store/', '*')
747747
.reply(200, function(uri, body, cb) {
748-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
748+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
749749
if (err) return done(err);
750750
var msg = JSON.parse(dec.toString());
751751
msg.extra.foo.should.equal('bar');
@@ -818,7 +818,7 @@ describe('raven.Client', function() {
818818
.filteringRequestBody(/.*/, '*')
819819
.post('/api/269/store/', '*')
820820
.reply(200, function(uri, body) {
821-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
821+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
822822
if (err) return done(err);
823823
var msg = JSON.parse(dec.toString());
824824
var extra = msg.extra;
@@ -850,7 +850,7 @@ describe('raven.Client', function() {
850850
.filteringRequestBody(/.*/, '*')
851851
.post('/api/269/store/', '*')
852852
.reply(200, function(uri, body) {
853-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
853+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
854854
if (err) return done(err);
855855
done();
856856
});
@@ -875,7 +875,7 @@ describe('raven.Client', function() {
875875
.post('/api/269/store/', '*')
876876
.delay(10)
877877
.reply(200, function(uri, body) {
878-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
878+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
879879
if (err) return done(err);
880880
var msg = JSON.parse(dec.toString());
881881
msg.message.should.equal('test');
@@ -929,7 +929,7 @@ describe('raven.Client', function() {
929929
.filteringRequestBody(/.*/, '*')
930930
.post('/api/269/store/', '*')
931931
.reply(200, function(uri, body) {
932-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
932+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
933933
if (err) return done(err);
934934
var msg = JSON.parse(dec.toString());
935935

@@ -970,7 +970,7 @@ describe('raven.Client', function() {
970970
.filteringRequestBody(/.*/, '*')
971971
.post('/api/269/store/', '*')
972972
.reply(200, function(uri, body) {
973-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
973+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
974974
if (err) return done(err);
975975
var msg = JSON.parse(dec.toString());
976976

@@ -1033,7 +1033,7 @@ describe('raven.Client', function() {
10331033
.filteringRequestBody(/.*/, '*')
10341034
.post('/api/269/store/', '*')
10351035
.reply(200, function(uri, body) {
1036-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1036+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
10371037
if (err) return done(err);
10381038
var msg = JSON.parse(dec.toString());
10391039
var modules = msg.modules;
@@ -1061,7 +1061,7 @@ describe('raven.Client', function() {
10611061
.filteringRequestBody(/.*/, '*')
10621062
.post('/api/269/store/', '*')
10631063
.reply(200, function(uri, body) {
1064-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1064+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
10651065
if (err) return done(err);
10661066
var msg = JSON.parse(dec.toString());
10671067
var extra = msg.extra;
@@ -1097,7 +1097,7 @@ describe('raven.Client', function() {
10971097
.filteringRequestBody(/.*/, '*')
10981098
.post('/api/269/store/', '*')
10991099
.reply(200, function(uri, body) {
1100-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1100+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
11011101
if (err) return done(err);
11021102
var msg = JSON.parse(dec.toString());
11031103
var tags = msg.tags;
@@ -1128,7 +1128,7 @@ describe('raven.Client', function() {
11281128
.filteringRequestBody(/.*/, '*')
11291129
.post('/api/269/store/', '*')
11301130
.reply(200, function(uri, body) {
1131-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1131+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
11321132
if (err) return done(err);
11331133
var msg = JSON.parse(dec.toString());
11341134

@@ -1154,7 +1154,7 @@ describe('raven.Client', function() {
11541154
.filteringRequestBody(/.*/, '*')
11551155
.post('/api/269/store/', '*')
11561156
.reply(200, function(uri, body) {
1157-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1157+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
11581158
if (err) return done(err);
11591159
var msg = JSON.parse(dec.toString());
11601160

@@ -1190,7 +1190,7 @@ describe('raven.Client', function() {
11901190
.filteringRequestBody(/.*/, '*')
11911191
.post('/api/269/store/', '*')
11921192
.reply(200, function(uri, body) {
1193-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1193+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
11941194
if (err) return done(err);
11951195
var msg = JSON.parse(dec.toString());
11961196

@@ -1222,7 +1222,7 @@ describe('raven.Client', function() {
12221222
.filteringRequestBody(/.*/, '*')
12231223
.post('/api/269/store/', '*')
12241224
.reply(200, function(uri, body) {
1225-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1225+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
12261226
if (err) return done(err);
12271227
var msg = JSON.parse(dec.toString());
12281228

@@ -1273,7 +1273,7 @@ describe('raven.Client', function() {
12731273
.filteringRequestBody(/.*/, '*')
12741274
.post('/api/269/store/', '*')
12751275
.reply(200, function(uri, body) {
1276-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1276+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
12771277
if (err) return done(err);
12781278
var msg = JSON.parse(dec.toString());
12791279
msg.message.indexOf('foo').should.not.equal(-1);
@@ -1296,7 +1296,7 @@ describe('raven.Client', function() {
12961296
.filteringRequestBody(/.*/, '*')
12971297
.post('/api/269/store/', '*')
12981298
.reply(200, function(uri, body) {
1299-
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
1299+
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
13001300
if (err) return done(err);
13011301
var msg = JSON.parse(dec.toString());
13021302
msg.message.indexOf('foo').should.not.equal(-1);

test/raven.utils.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,6 @@ describe('raven.utils', function() {
236236
var parseStack = raven.utils.parseStack;
237237

238238
var callback = function(frames) {
239-
// querystring was different back in old node, compat hack
240-
if (process.version < 'v4') frames.pop();
241-
242239
var frame1 = frames.pop();
243240
frame1.in_app.should.be.false;
244241
frame1.filename.should.equal('querystring.js');

0 commit comments

Comments
 (0)