Upgrade supertest to 3.x

Also fix tests relying on internal supertest API to keep working with
then new supertest internals after the upgrade.
This commit is contained in:
Miroslav Bajtoš 2017-02-09 16:17:10 +01:00
parent d80957819a
commit a80f844e88
4 changed files with 4 additions and 5 deletions

View File

@ -97,8 +97,7 @@
"sinon-chai": "^2.8.0",
"strong-error-handler": "^1.0.1",
"strong-task-emitter": "^0.0.6",
"supertest": "^2.0.0",
"supertest-as-promised": "^4.0.2"
"supertest": "^3.0.0"
},
"repository": {
"type": "git",

View File

@ -7,7 +7,7 @@
var expect = require('chai').expect;
var loopback = require('..');
var supertest = require('supertest-as-promised')(require('bluebird'));
var supertest = require('supertest');
describe('OptionsFromRemotingContext', function() {
var app, request, accessToken, userId, Product, actualOptions;

View File

@ -184,7 +184,7 @@ _describe.whenCalledRemotely = function(verb, url, data, cb) {
var test = this;
this.http.end(function(err) {
test.req = test.http.req;
test.res = test.http.res;
test.res = test.http.response;
delete test.url;
cb();

View File

@ -191,7 +191,7 @@ describe('relations - integration', function() {
if (err) return done(err);
this.req = this.http.req;
this.res = this.http.res;
this.res = this.http.response;
done();
}.bind(this));