Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MBR-0001 committed Dec 27, 2020
1 parent 5ed5f2c commit 9528b71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class SQUnpacker extends EventEmitter {
* @param {Buffer} buffer
*/
readMessage(buffer) {
console.log(buffer.length);
let header = buffer.readInt32LE();
buffer = buffer.slice(4);

Expand Down
8 changes: 4 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const SourceQuery = require("./index");
let servers = [
"139.99.124.97:28075",
"2.59.135.79:2303",
"216.52.148.47:27015",
"145.239.205.157:28016"
//"216.52.148.47:27015",
//"145.239.205.157:28016"
];

async function TestServer(ip) {
Expand All @@ -14,9 +14,9 @@ async function TestServer(ip) {
let failed = [];
let rv = {};

rv.info = await query.getInfo().catch(() => failed.push("info"));
//rv.info = await query.getInfo().catch(() => failed.push("info"));
rv.players = await query.getPlayers().catch(() => failed.push("players"));
rv.rules = await query.getRules().catch(() => failed.push("rules"));
//rv.rules = await query.getRules().catch(() => failed.push("rules"));

if (failed.length == 0) return rv;
else throw failed;
Expand Down

0 comments on commit 9528b71

Please sign in to comment.