mock socket.io-client with jest when socket used in an es6 class

前端 未结 0 523
执笔经年
执笔经年 2021-02-13 07:59

I\'m writing unit tests with jest and I want to mock the socket.io-client module so I can test an es6 class that\'s using it.

Here\'s a simplified version of the class:

相关标签:
回答
  • 消灭零回复
提交回复
热议问题