Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강동현
/
nodejs-game
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
강동현
2021-06-08 16:14:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
41b0a4d7f5bc2dddb60510a1d6626fcbda4ecf66
41b0a4d7
1 parent
f3ebdb47
준비하면 updateRoomUser가 수신되는지에 관한 테스트 추가
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
server/test/ready.test.ts
server/test/ready.test.ts
View file @
41b0a4d
...
...
@@ -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
{
...
...
Please
register
or
login
to post a comment