Console.log statements output nothing at all in Jest

前端 未结 8 2032
挽巷
挽巷 2020-12-05 22:11

console.log statements output nothing at all in Jest. This was working for me yesterday, and all of sudden, it\'s not working today. I have made zero changes to

8条回答
  •  悲&欢浪女
    2020-12-05 23:02

    In my case the problem was that the logs where made when the module is required, so before the start of an actual test case. Change from a top-level import to using require inside the test case fixed the problem.

提交回复
热议问题