0

Say I would like to test how clock component is rendering after 5, 10 and 15 minutes.

Is it possible to bypass some time without actual waiting in tests?

MaciejF
  • 516
  • 1
  • 6
  • 16
  • Not that I know, but maybe you can put `someTime` in your state and override it using enzyme's `wrapper.setState` - this way your tests won't take too long. – nirsky Jan 25 '17 at 15:25
  • It is some way to do that but I was thinking about some universal that would work even if value used in setTimeout weren't in any variable. – MaciejF Jan 25 '17 at 15:45
  • 1
    Duplicate of http://stackoverflow.com/questions/17446064/how-can-i-simulate-the-passing-of-time-in-mocha-tests-so-that-settimeout-callbac – Jeff McCloud Jan 25 '17 at 17:03

0 Answers0