mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
14 lines
380 B
JavaScript
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');
|
||
|
});
|
||
|
});
|