강동현

준비하면 updateRoomUser가 수신되는지에 관한 테스트 추가

......@@ -23,10 +23,28 @@ describe("준비", () => {
} = prepareJoinedRoom(1, 2, true);
expect(room.isReady(user)).eq(false);
socket.testOk("ready", { ready: true });
expect(room.isReady(user)).eq(true);
expect(socket.socket.received("updateRoomUser")).deep.eq({
state: "updated",
user: {
username: user.username,
admin: false,
ready: true,
},
});
socket.testOk("ready", { ready: false });
expect(room.isReady(user)).eq(false);
expect(socket.socket.received("updateRoomUser")).deep.eq({
state: "updated",
user: {
username: user.username,
admin: false,
ready: false,
},
});
});
it("방장은 준비할 수 없습니다", () => {
const {
......