File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 236
236
"ignore" : [
237
237
" /public/build" ,
238
238
" /public/vendor" ,
239
- " /lib/ot" ,
240
239
" webpack.*"
241
240
]
242
241
},
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const path = require('path')
5
5
6
6
function makeMockSocket ( headers , query ) {
7
7
const broadCastChannelCache = { }
8
- return {
8
+ const fakesocket = {
9
9
id : Math . round ( Math . random ( ) * 10000 ) ,
10
10
request : {
11
11
user : { }
@@ -14,8 +14,6 @@ function makeMockSocket (headers, query) {
14
14
headers : Object . assign ( { } , headers ) ,
15
15
query : Object . assign ( { } , query )
16
16
} ,
17
- on : sinon . fake ( ) ,
18
- emit : sinon . fake ( ) ,
19
17
broadCastChannelCache : { } ,
20
18
broadcast : {
21
19
to : ( channel ) => {
@@ -31,6 +29,10 @@ function makeMockSocket (headers, query) {
31
29
disconnect : sinon . fake ( ) ,
32
30
rooms : [ ]
33
31
}
32
+ fakesocket . on = sinon . fake . returns ( fakesocket )
33
+ fakesocket . emit = sinon . fake . returns ( fakesocket )
34
+ fakesocket . join = sinon . fake . returns ( fakesocket )
35
+ return fakesocket
34
36
}
35
37
36
38
function removeModuleFromRequireCache ( modulePath ) {
You can’t perform that action at this time.
0 commit comments