88 }
89 StreamingClient.mockImplementation(() => mockStreamingclient)
90 let url = 'http://localhost:9009'
91 let message = () => {}92
93 const connection = new SocketConnection(url, message, jest.fn)
94
59 }
60 StreamingClient.mockImplementation(() => mockStreamingclient)
61 let url = 'http://localhost:9009'
62 let message = () => {}63 let onSocketConnection: boolean
64 let isConnect = (isConnect: boolean) => {
65 onSocketConnection = isConnect
20 StreamingClient.mockImplementation(() => mockStreamingclient)
21
22 let url = 'http://localhost:9009'
23 let onMessage = () => {}24 let onSocketConnection: boolean
25 let onConnect = (isConnect: boolean) => {
26 onSocketConnection = isConnect
Having empty functions hurts readability, and is considered a code-smell. There's almost always a way to avoid using them. If you must use one, consider adding a comment to inform the reader of its purpose.
getUser('SwaGaLisTiQuE', () => {})
getUser('SwaGaLisTiQuE', () => {
// empty because <reason>
})