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

21 lines
377 B
JavaScript

/**
* 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();
});
});
});