Rename server tests

This commit is contained in:
Hamcha 2019-09-06 14:15:49 +02:00
parent d7ba4f911b
commit d573566126
Signed by: hamcha
GPG key ID: 44AD3571EB09A39E

View file

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