All files / server/tests auto.js

62.5% Statements 5/8
0% Branches 0/2
0% Functions 0/3
83.33% Lines 5/6
1 2 3 4 5 6 7 8 9 10 11 12 131x 1x 1x   1x             1x  
const request = require('request-promises');
const extend = require('extend');
const port = require('./helpers/port');
 
module.exports = opts => async ctx => {
  return await request(extend({}, {
    url: `http://localhost:${ctx.options.port}${opts.path || '/'}`,
    method: 'GET',
  }, opts));
};
 
module.exports.get = (path, opts) => module.exports({ method: 'GET', path, opts });