Basic networking #9
1 changed files with 3 additions and 3 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue