How to Mock Module function so that it throws an exception when called from within somewhere in your code

后端 未结 0 1629
生来不讨喜
生来不讨喜 2020-12-15 02:13

In Jest I want to test an express api written like this

router.get(\'/api-does-something\', api.middleware, async (req, res) => {
  try {
    const { destr         


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