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:
parent
d80957819a
commit
a80f844e88
|
@ -97,8 +97,7 @@
|
||||||
"sinon-chai": "^2.8.0",
|
"sinon-chai": "^2.8.0",
|
||||||
"strong-error-handler": "^1.0.1",
|
"strong-error-handler": "^1.0.1",
|
||||||
"strong-task-emitter": "^0.0.6",
|
"strong-task-emitter": "^0.0.6",
|
||||||
"supertest": "^2.0.0",
|
"supertest": "^3.0.0"
|
||||||
"supertest-as-promised": "^4.0.2"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
var expect = require('chai').expect;
|
var expect = require('chai').expect;
|
||||||
var loopback = require('..');
|
var loopback = require('..');
|
||||||
var supertest = require('supertest-as-promised')(require('bluebird'));
|
var supertest = require('supertest');
|
||||||
|
|
||||||
describe('OptionsFromRemotingContext', function() {
|
describe('OptionsFromRemotingContext', function() {
|
||||||
var app, request, accessToken, userId, Product, actualOptions;
|
var app, request, accessToken, userId, Product, actualOptions;
|
||||||
|
|
|
@ -184,7 +184,7 @@ _describe.whenCalledRemotely = function(verb, url, data, cb) {
|
||||||
var test = this;
|
var test = this;
|
||||||
this.http.end(function(err) {
|
this.http.end(function(err) {
|
||||||
test.req = test.http.req;
|
test.req = test.http.req;
|
||||||
test.res = test.http.res;
|
test.res = test.http.response;
|
||||||
delete test.url;
|
delete test.url;
|
||||||
|
|
||||||
cb();
|
cb();
|
||||||
|
|
|
@ -191,7 +191,7 @@ describe('relations - integration', function() {
|
||||||
if (err) return done(err);
|
if (err) return done(err);
|
||||||
|
|
||||||
this.req = this.http.req;
|
this.req = this.http.req;
|
||||||
this.res = this.http.res;
|
this.res = this.http.response;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
Loading…
Reference in New Issue