insomnia/app/backend/__tests__/dns.test.js
Gregory Schier 318c35c2cb Move a bunch of stuff to async/await (#39)
* Some minor implementations

* Some more

* Lots more

* Removed 'backend' alias

* removed all promises

* Removed a bunch of module exports stuff

* Some morE'

* Fix

* custom DNS

* Tests for DNS

* bug fix

* Some small adjustments

* Small stuff
2016-10-02 13:57:00 -07:00

14 lines
380 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://127.0.0.1/');
});
it('no-op on invalid', async () => {
const ip = await dnsUtils.swapHost('http://poooooooop');
expect(ip).toEqual('http://poooooooop');
});
});