mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-05-09 12:50:26 -04:00
fix ping tests. closes #28
This commit is contained in:
parent
ba29fa59d7
commit
484a2bd34f
1 changed files with 6 additions and 0 deletions
|
@ -245,6 +245,9 @@ describe("client", function() {
|
|||
}, function() {
|
||||
mc.ping({}, function(err, results) {
|
||||
if (err) return done(err);
|
||||
assert.ok(results.latency >= 0);
|
||||
assert.ok(results.latency <= 1000);
|
||||
delete results.latency;
|
||||
assert.deepEqual(results, {
|
||||
prefix: "§1",
|
||||
protocol: protocol.version,
|
||||
|
@ -446,6 +449,9 @@ describe("mc-server", function() {
|
|||
server.on('listening', function() {
|
||||
mc.ping({}, function(err, results) {
|
||||
if (err) return done(err);
|
||||
assert.ok(results.latency >= 0);
|
||||
assert.ok(results.latency <= 1000);
|
||||
delete results.latency;
|
||||
assert.deepEqual(results, {
|
||||
prefix: "§1",
|
||||
protocol: protocol.version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue