see coveralls report for missed branches.
we need some kind of a mock/fake rcon server to run during tests to determine the following:
- emission of the
connected event
- authentication packet being written after
connected event
- invocation of the queued callbacks in
this.responseCallbacks
- writing of queued commands in
this.commands
- clearing of queued commands in
this.commands
SERVERDATA_RESPONSE_VALUE branch execution
SERVERDATA_AUTH_RESPONSE branch execution
- error branch execution
- auto-connect behaviour
- immediate command writing if already authenticated
if we can cover all of these behaviours in tests, we'll have 100 (or close to) percent coverage. 🎉
see coveralls report for missed branches.
we need some kind of a mock/fake rcon server to run during tests to determine the following:
connectedeventconnectedeventthis.responseCallbacksthis.commandsthis.commandsSERVERDATA_RESPONSE_VALUEbranch executionSERVERDATA_AUTH_RESPONSEbranch executionif we can cover all of these behaviours in tests, we'll have 100 (or close to) percent coverage. 🎉