Writing these tests:
console.log( await ping.promise.probe('fakehostdoesntexist.com') );
// Manually unplug the cable...
console.log( await ping.promise.probe('google.com') );
both result in:
{
host: 'unknown',
alive: false,
output: '',
time: 'unknown',
times: [],
min: 'unknown',
max: 'unknown',
avg: 'unknown',
stddev: 'unknown',
packetLoss: 'unknown'
}
(the latter happen only when the network cable is unplugged)
I think it should have at least the host property setted to the actual host pinged. Not sure for other properties as ping implementation may vary depending on platforms (I'm on Ubuntu 18.04.3).