message: Use the Node url module to create the URL. Follow-up on
diff: const assert = require('assert');
  const rp = require('request-promise');
  +const url = require('url');
  const app = require('../<%= src %>/app');
  -const host = process.env.HOST || app.get('host') || 'localhost';
  -const port = process.env.PORT || app.get('port') || 3030;
  -
  -// eslint-disable-next-line no-unused-vars
  -const genURL = path => `http://${host}:${port}/${path || ''}`;
  +const port = app.get('port') || 3030;
  +const getUrl = pathname => url.format({
  + hostname: app.get('host') || 'localhost',
  + protocol: 'http',
  + port,
  + pathname
  +});
  describe('Feathers application tests', () => {
  before(function(done) {
  @@ -19,7 +22,7 @@ describe('Feathers application tests', () => {
  });
  it('starts and shows the index page', () => {
  - return rp(genURL()).then(body =>
  + return rp(getUrl()).then(body =>
  assert.ok(body.indexOf('<html>') !== -1)
  );
  });
  @@ -27,7 +30,7 @@ describe('Feathers application tests', () => {
  describe('404', function() {
  it('shows a 404 HTML page', () => {
  return rp({
  - url: genURL('path/to/nowhere'),
  + url: getUrl('path/to/nowhere'),
  headers: {
  'Accept': 'text/html'
  }
  @@ -39,7 +42,7 @@ describe('Feathers application tests', () => {
  it('shows a 404 JSON error without stack trace', () => {
  return rp({
  - url: genURL('path/to/nowhere'),
  + url: getUrl('path/to/nowhere'),
  json: true
  }).catch(res => {
  assert.equal(res.statusCode, 404);
  