Has any one tried mocking moment's utcOffset using jest for a specific unit-test (`it` block)

前端 未结 0 1221
忘了有多久
忘了有多久 2021-01-29 19:25

Not sure of a way to mock. I would want to mock moment().utcOffset() to return 200. So that I can test a certain block of code that uses moment().utcOffset()<

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