Commit graph

171 commits

Author SHA1 Message Date
Romain Beaumont
b445e7fb94
fix kicking message in test for 1.12 2017-06-19 14:57:28 +02:00
Romain Beaumont
d9d1b7a56e
fix 1.12 tests : implement anon fields, set varint test value to 1 for some switch, implement bitfield, don't assume non-anon containers for packets 2017-06-19 14:34:13 +02:00
Romain Beaumont
20dd0710f2 parallel circle ci testing of clientTest.js (#373) (#449)
parallel testing with circle ci, solve #373
2017-05-10 02:49:13 +02:00
Romain Beaumont
a55d2bc42c
produce a decent error when connecting with the wrong version 2017-03-12 12:23:13 +01:00
Romain Beaumont
9c089244b3
use a different data dir for each version in tests 2016-11-16 01:02:15 +01:00
Romain Beaumont
00b539d0c7 fix tests and fix #360 2016-02-23 19:37:47 +01:00
Romain Beaumont
88bb301693 fix packet test 2016-02-23 19:11:12 +01:00
Romain Beaumont
6fb6b35cc5 disable online test for now
until we save the tokens or something like that, which bypass the mojang server limits
2016-02-20 17:18:56 +01:00
Romain Beaumont
25e2cdcf62 update long and packages 2016-02-19 23:43:30 +01:00
Romain Beaumont
09b491f39e https://github.com/roblabla/ProtoDef/pull/50 : update to new numerical names 2016-02-19 16:58:30 +01:00
Romain Beaumont
3132303c2e add new datatypes test values for 1.7, progress on #359 2016-02-19 01:47:44 +01:00
Romain Beaumont
14ec6077cd using minecraftVersion everywhere 2016-02-19 01:02:57 +01:00
Romain Beaumont
a129d13cf1 use minecraftVersion in tests, stop if no varint in framer 2016-02-19 00:48:39 +01:00
Romain Beaumont
b2b53c9343 a few small changes to make the code better 2015-11-30 22:19:56 +01:00
Romain Beaumont
d25c4a2017 add optionalNbt, use it directly in protocol.json in packets and for defining slot 2015-11-15 17:48:25 +01:00
Romain Beaumont
30d0939968 use prismarine-nbt 0.1.0 and fix some npm warnings 2015-11-15 02:33:32 +01:00
Romain Beaumont
d86a59c393 use protodef utils, fix #295 2015-11-09 15:40:04 +01:00
Romain Beaumont
f45c6dff49 use protodef:
* move general datatypes to protodef along with their tests
* move states to states.js file
* use one protodef serializer by state and direction instead of one big serializer for everything (same thing for the deserializer)
* define a packet as a protodef type using a switch and a container, and adding each minecraft packet as a type (packet_ + name)
* use mapper type from protodef to convert id to name in packet definition
* use general string type : pstring
* divide by 10 the number of iteration in the benchmark to get back to a reasonable test execution time
2015-11-08 23:29:51 +01:00
Robin Lambertz
75303f412f Merge pull request #270 from rom1504/split_tests
split the tests in 3 files, fix #265
2015-10-13 22:24:14 +02:00
Robin Lambertz
5593c69416 Merge pull request #264 from rom1504/mocha_benchmarks
use mocha for benchmark (allow better mocha grepping + it's cleaner)
2015-10-13 22:20:11 +02:00
Romain Beaumont
92b4b2bf8d split the tests in 3 files, fix #265 2015-10-02 02:02:54 +02:00
roblabla
8ce13dd9e2 Fix tests : client.session.username doesn't exist 2015-10-02 01:30:23 +02:00
Robin Lambertz
c5d4848dfd Merge pull request #263 from rom1504/enable_client_connection_tests
Enable client connection tests
2015-10-02 01:24:31 +02:00
Romain Beaumont
9e0cecfc6f update minecraft-wrap : wrap.download now automatically checks the md5 of the file before and after downloading 2015-10-01 14:25:07 +02:00
Romain Beaumont
449c8dee00 increase mocha timeout to 20s for benchmarks 2015-09-30 18:16:41 +02:00
Romain Beaumont
1d5f55235e use mocha for benchmark (allow better mocha grepping + it's cleaner) 2015-09-30 18:11:57 +02:00
Romain Beaumont
788ad29815 fix chat count problem in tests + line listener 2015-09-30 17:53:24 +02:00
Romain Beaumont
698a64f926 fix and enable online client connection test 2015-09-30 17:30:52 +02:00
Romain Beaumont
fd0d9f5a13 fix and enable offline client connection test 2015-09-30 17:23:47 +02:00
Romain Beaumont
917b6adda1 enable cross version with an option in createClient and createServer :
* put parsePacketData in deserializer and createPacketBuffer in serializer
* remove packets from the index and expose readPacket instead
* load packets when needed in various files
* make tests test every supported version
static cross version of #234, fix #65, fix #240
2015-09-29 22:44:28 +02:00
Robin Lambertz
baca58459d Merge pull request #247 from rom1504/check_start_server_err
check the error in the callback of wrap.startServer
2015-09-23 23:07:15 +02:00
Robin Lambertz
24dced6e39 Merge pull request #252 from rom1504/remove_zfill_dependency
remove zfill dependency used nowhere
2015-09-23 21:30:39 +02:00
Robin Lambertz
a7e74cdb1d Merge pull request #253 from roblabla/feature-newContextSyntax
New context syntax
2015-09-23 19:39:36 +02:00
roblabla
11239a989c Update tests for new context management 2015-09-23 18:49:55 +02:00
Romain Beaumont
6b15cffe4c remove zfill dependency used nowhere 2015-09-21 10:46:19 +02:00
Romain Beaumont
39d2dfebff check the error in the callback of wrap.startServer 2015-09-20 20:29:58 +02:00
Robin Lambertz
2c93a4e796 Merge pull request #244 from rom1504/patch-1
Print some more info in order to fix https://github.com/PrismarineJS/node-minecraft-protocol/issues/194
2015-09-20 01:05:53 +02:00
roblabla
b1441098f9 Only allow writing by packetName. Refactor whole internals to use packetNames 2015-09-20 00:55:29 +02:00
roblabla
56c9f3ed9a Index packetFields by name. Use packet names in test.js 2015-09-20 00:41:03 +02:00
Romain Beaumont
7a0dd6b8cf Should print some more info in order to fix https://github.com/PrismarineJS/node-minecraft-protocol/issues/194 2015-09-19 22:45:39 +02:00
Robin Lambertz
a2abb70fc7 Merge pull request #237 from rom1504/use_minecraft_wrap
use minecraft-wrap : get the vanilla server wrapping out of node-minecraft-protocol
2015-09-15 14:54:26 +02:00
Romain Beaumont
6bacdf33cc check if the reason contains the quoted reason instead of strict equality : make the tests work with the same code in 1.8 and 1.9 2015-09-14 22:52:11 +02:00
Romain Beaumont
6bad0f8461 Change quit reasons to json as is now required in 1.9 2015-09-14 22:52:01 +02:00
Romain Beaumont
eeed7b643c use minecraft-wrap : get the vanilla server wrapping out of node-minecraft-protocol 2015-09-14 22:14:13 +02:00
Romain Beaumont
9804d0983b transform play numerical ids to names, remove most entity metadata test values for compatibility 2015-09-12 21:49:17 +02:00
Romain Beaumont
498d9f2c81 make benchmark.js independent of ids (related with #232) 2015-09-12 21:49:17 +02:00
roblabla
150af656c7 Use power-assert instead of assert, otherwise stuff fail 2015-09-12 00:40:24 +00:00
roblabla
b255eaadd1 Implement bitfields. Add tests for utils datatypes 2015-09-12 00:40:18 +00:00
roblabla
dd2cfa1fa3 Add tests for numeric dataTypes 2015-09-08 13:09:08 +00:00
roblabla
79ded321bf Add extend type support 2015-09-03 13:05:11 +00:00
Robin Lambertz
388879bd4b Merge pull request #227 from roblabla/feature-addOption
Add option type
2015-09-02 19:37:04 +02:00
roblabla
ed372e6f39 Add option type 2015-08-28 15:21:59 +00:00
roblabla
7e145f763d First attempt at better error handling, also some general cleanup 2015-08-27 20:48:45 +00:00
roblabla
3282cf69c7 Introduce switch and void, remove condition 2015-08-25 11:55:25 +00:00
roblabla
ba8a3790aa Add the new type syntax support. Old type syntax doesn't work 2015-08-24 18:25:56 +00:00
Robin Lambertz
9eeea84e92 Merge pull request #208 from rom1504/better_error_and_fix_from_1.9
Better error and fix from 1.9
2015-08-08 14:53:23 +02:00
Romain Beaumont
57f5b9d23d Fix some version related problems (in test.js and circle.yml) 2015-08-02 15:38:40 +02:00
Romain Beaumont
6b6303b853 use protocol.json from minecraft-data
fix #163
2015-08-01 20:13:32 +02:00
roblabla
452be2b196 Bump MINOR, UUIDs are now represented as dashed string 2015-07-18 17:48:26 +00:00
Robin Lambertz
c9a740f989 Merge pull request #178 from roblabla/feature-remove-ustring
Remove ustring
2015-05-23 15:27:26 +02:00
roblabla
7ecfec8c3b Remove ustring test 2015-05-23 10:28:31 +00:00
Romain Beaumont
1a9e08cbd8 move createPacketBuffer and parsePacketData functions to serializer, also move protocol's exports to serializer 2015-05-23 03:31:47 +02:00
roblabla
ced091b2b2 Rewrite of the internal serializer using transform streams 2015-05-22 17:26:48 +00:00
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