This question may be stemming from general newness to the whole NodeJs ecosystem, apologies if it's not too specific to colyseus. I have a general understanding of how Mocha/Chai testing works and have run tests on another project in the past. But with the presence of a websocket server and asynchronous state patches flying around I'm not sure of a good testing paradigm for a colyseus game engine. I am working on an entirely turn-based game, so careful checks of timing is not an issue, I would just like to check that my messaging system and state updates work as expected based on the desired game logic. Any suggestions?
So far I have set up a simple MyRoom.test.js script that starts up a colyseus server and makes colyseus.js clients. I can test simple connecting / room creation using async Mocha/Chai tests. I'm a bit stuck on how to check for state updating the way I expect it to, since this is asynchonously patched.