Basic networking #9

Merged
hamcha merged 17 commits from feature/basic-networking into master 2019-09-06 12:36:11 +00:00
Showing only changes of commit d573566126 - Show all commits

View file

@ -14,12 +14,12 @@ function messageKind(kind: string): (msg: NetworkMessage) => void {
}
describe("network/PeerServer", () => {
test("Create server", () => {
test("A server can be created", () => {
const mox = new MockHelper();
mox.createServer(sampleRoom());
});
test("Test client join", async () => {
test("Clients can join servers and receive data", async () => {
const mox = new MockHelper();
const hook = new EventHook();
mox.createServer(sampleRoom());
@ -30,7 +30,7 @@ describe("network/PeerServer", () => {
await hook.expect("client-data", 1000, messageKind("player-joined"));
});
test("Test multiple clients (w/ name collision)", async () => {
test("Servers handle multiple clients and resolve name collisions", async () => {
const mox = new MockHelper();
const hook = new EventHook();
mox.createServer(sampleRoom());