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

前端 未结 0 1730
忘了有多久
忘了有多久 2021-02-13 08:04

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:

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