kibana/test/utils/getUrl.js
Joe Fleming e50bb3b859 provide safe methods for app navigation
also change the way getUrl works
2015-11-05 14:41:43 -07:00

23 lines
480 B
JavaScript

var _ = require('lodash');
var url = require('url');
/**
* Converts a config and a pathname to a url
* @param {object} config A url config
* example:
* {
* protocol: 'http',
* hostname: 'localhost',
* port: 9220
* }
* @param {object} app The params to append
* example:
* {
* pathname: 'app/kibana',
* hash: '/discover'
* }
* @return {string}
*/
module.exports = function getPage(config, app) {
return url.format(_.assign(config, app));
};