Skip to content

Commit

Permalink
Merge pull request #158 from pjonsson/test-deprecation-fixes
Browse files Browse the repository at this point in the history
Fix deprecation warnings in tests
  • Loading branch information
na9da authored May 22, 2024
2 parents 03c15ca + a3b1ece commit 3b66d7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/proxy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('proxy', function() {
.send('boaty mcboatface')
.expect(200)
.expect(function() {
expect(fakeRequest.calls.argsFor(0)[0].body).toEqual(new Buffer('boaty mcboatface'));
expect(fakeRequest.calls.argsFor(0)[0].body).toEqual(Buffer.from('boaty mcboatface'));
})
.end(assert(done));
});
Expand Down Expand Up @@ -567,7 +567,7 @@ describe('proxy', function() {
}

function requestFake(req) {
const responseStatus = req.headers['x-give-response-status'] || 200;
const responseStatus = parseInt(req.headers['x-give-response-status']) || 200;
var request = {
on: function(event, cb) {
if (event === 'response') {
Expand Down

0 comments on commit 3b66d7c

Please sign in to comment.