getIpv4Address.test.ts 358 Bytes
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import * as assert from 'assert';
import { getIPV4Address } from '../../common/utils';

it('getIpv4Address', async () => {
    const ip1 = await getIPV4Address();
    const ip2 = await getIPV4Address();
    assert.match(ip1, /^\d+\.\d+\.\d+\.\d+$/);
    assert.equal(ip1, ip2);
});