Commit graph

158 commits

Author SHA1 Message Date
Romain Beaumont
1dec8ccffd fix indentation and a few other stuff webstorm felt like fixing (for example if (condition) -> if(condition) since that was the more frequent style in node-minecraft-protocol) 2015-05-14 22:08:49 +02:00
Romain Beaumont
04a3f72130 readCondition now return value==null when the condition is not met instead of returning null (when read returns null it means there was an error), check if value is null in readContainer and parsePacketData and don't include it if so, improve "field x missing" error message in test.js a bit 2015-05-09 16:08:54 +02:00
Romain Beaumont
63b332ce38 remove condition property checks, also remove that property from the schema 2015-05-09 06:21:39 +02:00
Romain Beaumont
faed176631 add new condition type :
* protocol.js : new read, write and sizeOf methods and add check for condition type inside read
* update protocol.json
* update protocol_schema.json
* some fixes in test.js to handle the new condition type
2015-05-09 05:58:12 +02:00
Romain Beaumont
9c9f358a5d add current json schema (and a small validate.js test using jsonschema module) : makes it easier to fully understand the format 2015-05-09 04:06:33 +02:00
Romain Beaumont
bf8a7899ae transform condition functions into objects 2015-05-08 03:08:30 +02:00
roblabla
482d32427d Use it.skip instead of commenting 2015-04-26 13:02:59 +00:00
Romain Beaumont
73ed7e2cdd removes some console.log 2015-03-29 18:33:45 +02:00
Romain Beaumont
f71a27a331 checks what the server output is 2015-03-29 18:18:58 +02:00
Romain Beaumont
8886cc5344 checks if server jar exists 2015-03-29 18:12:54 +02:00
Will Franzen
06cd5f5441 Fix require statements 2015-03-06 23:00:32 -06:00
roblabla
fbc60cd501 Fix tests so they pass on 0.10, take two 2015-03-07 00:03:55 +00:00
roblabla
e8370dc65f Lower timeout to 1 minute 2015-03-06 23:43:22 +00:00
roblabla
63fe55e4ed Fix test and benchmark on node 0.10 2015-03-06 23:37:47 +00:00
roblabla
c27a40cde2 Fix benchmark 2015-03-06 23:10:05 +00:00
roblabla
18b9355ca9 Update the tests. Two of them are temporarely stubbed 2015-03-06 17:20:18 +00:00
roblabla
db4c25883e Fix tests, fix small bug in protocol.js 2015-02-27 14:35:22 +00:00
roblabla
66a6584a6a Fix tests, fix lots of bugs in protocol.js 2015-02-20 01:05:15 +00:00
Robin Lambertz
78f0ea8fb9 Fix test for 1.7.10 compatibility 2014-09-08 14:32:15 +02:00
Robin Lambertz
cb24696982 Fix tests involving the server jar 2014-09-08 13:36:47 +02:00
roblabla
457df31b0b Container, array, buffer and count types added 2014-04-04 10:32:20 +02:00
roblabla
c0ba7f8127 Proper generic read/write/sizeOf functions 2014-04-01 15:43:57 +02:00
deathcap
0cd3ed13d9 Add packet names 2014-01-13 21:56:56 -08:00
roblabla
875d10ed0b Protocol 1.7 support, Yggdrasil login support, new Client State API 2014-01-06 00:57:18 +01:00
Matt Bell
2b594399ea Reduced benchmark execution time 2014-01-02 16:58:09 -08:00
darthfett
9b274df54a Cleanup: terminate all statements with semicolons, remove unnecessary semicolons, remove unused variables, add hasOwnProperty checks in 'for x in y' loops. 2013-11-19 16:55:30 -07:00
Xabier de Zuazo
bdc703a3f0 0x03: server chat packet test fixed 2013-08-07 19:16:05 +02:00
Xabier de Zuazo
c0a66738a3 packet 0x2c: writing fixed, UUID format simplified 2013-07-12 13:19:34 +02:00
Xabier de Zuazo
a4ba03d6a2 remove .test.js.swp file 2013-07-09 07:27:20 +02:00
Xabier de Zuazo
cd6b27aeac tests fixed: parse properly the new JSON chat messages 2013-07-08 10:55:42 +02:00
Matt Bell
1df9f9071f Added tests for new datatypes 2013-07-07 09:05:05 +02:00
Matt Bell
169fa1c986 Added benchmark script 2013-03-15 23:13:05 -07:00
Andrew Kelley
09a80dddd2 all tests passing with newest protocol 2013-03-13 23:27:15 -04:00
Andrew Kelley
174481fc2a more robust 0x28 test 2013-02-02 15:19:37 -05:00
Andrew Kelley
df3f95e1ff don't require both email and username. closes #32
This change breaks backwards compatibility.

`createClient` no longer takes an `email` argument. Instead, the
`username` argument is used to authenticate and determine the
case correct username.

There is a special case if you leave out the `password` argument.
In this case, `username` is used to connect directly to the server,
and you may get kicked if the server is in online mode.
2013-01-30 19:56:43 -05:00
Andrew Kelley
484a2bd34f fix ping tests. closes #28 2013-01-28 19:24:03 -05:00
Andrew Kelley
035f69919d better error reporting. add test 2013-01-26 22:46:47 -05:00
Andrew Kelley
5a85aa454f fix incorrectly swapped stance and y on 0x0d
add test that would have caught the bug
2013-01-10 20:34:56 -05:00
Andrew Kelley
2c9d1965db better test coverage 2013-01-08 03:00:37 -05:00
Andrew Kelley
0aa52864df simplify and fix entityMetadata parsing and serializing 2013-01-08 02:44:17 -05:00
Andrew Kelley
c03ac963d9 all writers finished and tested. closes #15 2013-01-08 01:53:30 -05:00
Andrew Kelley
817fb9b51e add writers for most data types 2013-01-08 00:50:43 -05:00
Andrew Kelley
10cb3e0100 test all packets 2013-01-07 23:36:14 -05:00
Andrew Kelley
37d1cdcca1 fix chat test. passes on windows now too. 2013-01-05 15:52:46 -05:00
Andrew Kelley
cbb5be36b9 test passing: correct reason for kicking clients when shutting down 2013-01-04 22:53:54 -05:00
Andrew Kelley
2e75851fd6 test passing: clients can log in and chat 2013-01-04 22:47:54 -05:00
Andrew Kelley
68b29db639 passing test: server kicks clients that do not send keepalive packets 2013-01-04 21:56:19 -05:00
Andrew Kelley
150c89cc6d passing test: pinging a real minecraft server 2013-01-04 21:42:31 -05:00
Andrew Kelley
38194ee9b4 add test, ping, and 2 API changes
* passing test: responds to ping requests
 * `mc.ping` - ping a server for info
 * `createServer`: `options.timeout` -> `options.checkTimeoutInterval`
 * `Client` emits `connect` event
2013-01-04 21:33:19 -05:00
Andrew Kelley
1661ef3b4b API updates
* test passing: kicks clients that do not log in
 * index exports `Client` and `Server`
 * `createServer`: `options.keepAliveInterval` -> `options.kickTimeout`
 * `Client` event `end` includes `reason` argument
   - `LoginTimeout`
   - `KeepAliveTimeout`
   - `ServerShutdown`
 * `createClient`: Set `options.keepAlive` to `false` to disable sending
   keep alive packets
 * `Client`: `options.isServer` defaults to `false`.
2013-01-04 20:55:53 -05:00
Andrew Kelley
c9ed8a2792 server API update
* add passing test for "starts listening"
 * server.socket -> server.socketServer
 * add client.id which can be used as entity id
 * add server.clients which is {clientId: client}
 * update server examples
 * server emits 'close' event, not 'end' event
 * add server.close()
2013-01-04 20:22:19 -05:00
Andrew Kelley
8096a08afd avoid dependency on iconv. makes it easier to use on windows. see #12 2013-01-04 19:04:06 -05:00
Andrew Kelley
62e66be053 writePacket -> write 2013-01-03 21:42:50 -05:00
Andrew Kelley
fadb9e0c0a un-namespace packet events. remove generic packet event. 2013-01-03 20:59:58 -05:00
Andrew Kelley
4b0780db66 all tests passing. closes #3 2013-01-02 03:30:33 -05:00
Andrew Kelley
46d862b1c4 test passing: get kicked for no credentials in online mode 2013-01-02 02:33:40 -05:00
Andrew Kelley
bde45a3d33 test passing: connects successfully - offline mode 2013-01-02 02:19:47 -05:00
Andrew Kelley
c2beb41fef test passing: connects successfully - online mode 2013-01-02 01:12:42 -05:00