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 236236 "ignore" : [
237237 " /public/build" ,
238238 " /public/vendor" ,
239- " /lib/ot" ,
240239 " webpack.*"
241240 ]
242241 },
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const path = require('path')
55
66function makeMockSocket ( headers , query ) {
77 const broadCastChannelCache = { }
8- return {
8+ const fakesocket = {
99 id : Math . round ( Math . random ( ) * 10000 ) ,
1010 request : {
1111 user : { }
@@ -14,8 +14,6 @@ function makeMockSocket (headers, query) {
1414 headers : Object . assign ( { } , headers ) ,
1515 query : Object . assign ( { } , query )
1616 } ,
17- on : sinon . fake ( ) ,
18- emit : sinon . fake ( ) ,
1917 broadCastChannelCache : { } ,
2018 broadcast : {
2119 to : ( channel ) => {
@@ -31,6 +29,10 @@ function makeMockSocket (headers, query) {
3129 disconnect : sinon . fake ( ) ,
3230 rooms : [ ]
3331 }
32+ fakesocket . on = sinon . fake . returns ( fakesocket )
33+ fakesocket . emit = sinon . fake . returns ( fakesocket )
34+ fakesocket . join = sinon . fake . returns ( fakesocket )
35+ return fakesocket
3436}
3537
3638function removeModuleFromRequireCache ( modulePath ) {
You can’t perform that action at this time.
0 commit comments