You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
460 B
14 lines
460 B
var request = require("request-promise");
|
|
var assert = require("chai").assert;
|
|
|
|
exports.GET = function (route) {
|
|
return request({
|
|
url: "http://localhost:12345" + route,
|
|
resolveWithFullResponse: true,
|
|
}).then(function (res) {
|
|
// Express sends 500 errors for uncaught exceptions (like failed assertions)
|
|
// Make sure to still fail the test if an assertion in middleware failed.
|
|
assert.equal(res.statusCode, 200);
|
|
return res;
|
|
});
|
|
};
|
|
|