insomnia/app/backend/__tests__/dns.test.js
Gregory Schier 659f947af3 Fixed tests
2016-10-26 13:30:31 -07:00

14 lines
376 B
JavaScript

import * as dnsUtils from '../dns';
describe('swapHost()', () => {
it('succeed with localhost', async () => {
const ip = await dnsUtils.swapHost('http://localhost');
expect(ip).toEqual('http://[::1]/');
});
it('no-op on invalid', async () => {
const ip = await dnsUtils.swapHost('http://poooooooop');
expect(ip).toEqual('http://poooooooop');
});
});