tribune
Version:
Holy advocate to the Roman Senate, your Tribune will ensure the Consuls have your interests in mind.
26 lines (21 loc) • 634 B
JavaScript
/* global describe it */
const assert = require('assert');
const Endpoint = require('../lib/endpoint');
describe('new Endpoint(opts) -> this', () => {
it('generates a url property', () => {
const endpoint = new Endpoint({
Tags : ['$protocol:http\\:'],
Address: 'service.url',
Port : 8000
});
assert.equal(endpoint.url, 'http://service.url:8000');
});
it('generates a tags array', () => {
const endpoint = new Endpoint({
Tags : ['$protocol:http\\:'],
Address: 'service.url',
Port : 8000
});
assert.equal(endpoint.tags.get('protocol'), 'http:');
});
});