GT2/GT2-iOS/node_modules/pac-resolver/test/myIpAddress.js

21 lines
377 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
/**
* Module dependencies.
*/
var isIP = require('net').isIP;
var assert = require('assert');
var myIpAddress = require('../myIpAddress');
describe('myIpAddress()', function () {
it('should return an IPv4 address', function (done) {
myIpAddress(function (err, ip) {
if (err) return done(err);
assert.equal(4, isIP(ip));
done();
});
});
});