Is there a way to stop time in Javascript, so I can test a function against DateTime.now()?

后端 未结 0 613
故里飘歌
故里飘歌 2020-12-06 23:55

I have a function that returns DateTime.now() under certain conditions. I want to test that function but if I test it against DateTime.now(), it will create a flaky test. Is

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