mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
check the error in the callback of wrap.startServer
This commit is contained in:
parent
2c93a4e796
commit
39d2dfebff
1 changed files with 15 additions and 5 deletions
20
test/test.js
20
test/test.js
|
@ -222,7 +222,9 @@ describe("client", function() {
|
|||
wrap.startServer({
|
||||
motd: 'test1234',
|
||||
'max-players': 120,
|
||||
}, function() {
|
||||
}, function(err) {
|
||||
if(err)
|
||||
return done(err);
|
||||
mc.ping({}, function(err, results) {
|
||||
if(err) return done(err);
|
||||
assert.ok(results.latency >= 0);
|
||||
|
@ -241,7 +243,9 @@ describe("client", function() {
|
|||
});
|
||||
});
|
||||
it.skip("connects successfully - online mode (STUBBED)", function(done) {
|
||||
wrap.startServer({'online-mode': 'true'}, function() {
|
||||
wrap.startServer({'online-mode': 'true'}, function(err) {
|
||||
if(err)
|
||||
return done(err);
|
||||
var client = mc.createClient({
|
||||
username: process.env.MC_USERNAME,
|
||||
password: process.env.MC_PASSWORD,
|
||||
|
@ -270,7 +274,9 @@ describe("client", function() {
|
|||
done();
|
||||
});
|
||||
it.skip("connects successfully - offline mode (STUBBED)", function(done) {
|
||||
wrap.startServer({'online-mode': 'false'}, function() {
|
||||
wrap.startServer({'online-mode': 'false'}, function(err) {
|
||||
if(err)
|
||||
return done(err);
|
||||
var client = mc.createClient({
|
||||
username: 'Player',
|
||||
});
|
||||
|
@ -319,7 +325,9 @@ describe("client", function() {
|
|||
done();
|
||||
});
|
||||
it("gets kicked when no credentials supplied in online mode", function(done) {
|
||||
wrap.startServer({'online-mode': 'true'}, function() {
|
||||
wrap.startServer({'online-mode': 'true'}, function(err) {
|
||||
if(err)
|
||||
return done(err);
|
||||
var client = mc.createClient({
|
||||
username: 'Player',
|
||||
});
|
||||
|
@ -335,7 +343,9 @@ describe("client", function() {
|
|||
});
|
||||
});
|
||||
it("does not crash for " + SURVIVE_TIME + "ms", function(done) {
|
||||
wrap.startServer({'online-mode': 'false'}, function() {
|
||||
wrap.startServer({'online-mode': 'false'}, function(err) {
|
||||
if(err)
|
||||
return done(err);
|
||||
var client = mc.createClient({
|
||||
username: 'Player',
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue