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

Commit

Permalink
2.6.1 [fixed node10 tests]
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed May 10, 2018
1 parent f786fcf commit 6373464
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"raven": "./bin/raven"
},
"scripts": {
"lint": "node_modules/eslint/bin/eslint.js .",
"lint": "eslint . --quiet",
"precommit": "lint-staged",
"pretest": "npm install && npm run lint",
"test": "NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test node_modules/coffee-script/bin/coffee ./test/run.coffee",
"test": "NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test coffee ./test/run.coffee",
"test-mocha": "NODE_ENV=test mocha",
"test-full": "npm run test && cd test/instrumentation && ./run.sh"
},
Expand Down
36 changes: 18 additions & 18 deletions test/raven.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());

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

Expand Down Expand Up @@ -654,7 +654,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
var extra = msg.extra;
Expand Down Expand Up @@ -745,7 +745,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body, cb) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
msg.extra.foo.should.equal('bar');
Expand Down Expand Up @@ -818,7 +818,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
var extra = msg.extra;
Expand Down Expand Up @@ -850,7 +850,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
done();
});
Expand All @@ -875,7 +875,7 @@ describe('raven.Client', function() {
.post('/api/269/store/', '*')
.delay(10)
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
msg.message.should.equal('test');
Expand Down Expand Up @@ -929,7 +929,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());

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

Expand Down Expand Up @@ -1033,7 +1033,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
var modules = msg.modules;
Expand Down Expand Up @@ -1061,7 +1061,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
var extra = msg.extra;
Expand Down Expand Up @@ -1097,7 +1097,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
var tags = msg.tags;
Expand Down Expand Up @@ -1128,7 +1128,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());

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

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

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

Expand Down Expand Up @@ -1273,7 +1273,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
msg.message.indexOf('foo').should.not.equal(-1);
Expand All @@ -1296,7 +1296,7 @@ describe('raven.Client', function() {
.filteringRequestBody(/.*/, '*')
.post('/api/269/store/', '*')
.reply(200, function(uri, body) {
zlib.inflate(new Buffer(body, 'base64'), function(err, dec) {
zlib.inflate(Buffer.from(body, 'base64'), function(err, dec) {
if (err) return done(err);
var msg = JSON.parse(dec.toString());
msg.message.indexOf('foo').should.not.equal(-1);
Expand Down
3 changes: 0 additions & 3 deletions test/raven.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ describe('raven.utils', function() {
var parseStack = raven.utils.parseStack;

var callback = function(frames) {
// querystring was different back in old node, compat hack
if (process.version < 'v4') frames.pop();

var frame1 = frames.pop();
frame1.in_app.should.be.false;
frame1.filename.should.equal('querystring.js');
Expand Down

1 comment on commit 6373464

@kamilogorek
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't support < v4 anymore.

Please sign in to comment.