mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
passing test: pinging a real minecraft server
This commit is contained in:
parent
38194ee9b4
commit
150c89cc6d
2 changed files with 20 additions and 2 deletions
|
@ -4,7 +4,7 @@ var STRING_MAX_LENGTH = 240;
|
|||
|
||||
module.exports = {
|
||||
version: 51,
|
||||
minecraftVersion: '1.4.6',
|
||||
minecraftVersion: '1.4.7',
|
||||
sessionVersion: 13,
|
||||
parsePacket: parsePacket,
|
||||
createPacketBuffer: createPacketBuffer,
|
||||
|
|
20
test/test.js
20
test/test.js
|
@ -109,7 +109,25 @@ describe("client", function() {
|
|||
after(function(done) {
|
||||
rimraf(MC_SERVER_PATH, done);
|
||||
});
|
||||
it("pings the server");
|
||||
it("pings the server", function(done) {
|
||||
startServer({
|
||||
motd: 'test1234',
|
||||
'max-players': 120,
|
||||
}, function() {
|
||||
mc.ping({}, function(err, results) {
|
||||
if (err) return done(err);
|
||||
assert.deepEqual(results, {
|
||||
prefix: "§1",
|
||||
protocol: protocol.version,
|
||||
version: protocol.minecraftVersion,
|
||||
motd: 'test1234',
|
||||
playerCount: 0,
|
||||
maxPlayers: 120
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
it("connects successfully - online mode", function(done) {
|
||||
startServer({ 'online-mode': 'true' }, function() {
|
||||
var client = mc.createClient({
|
||||
|
|
Loading…
Reference in a new issue