Test-helper time

Hi every1,

I’m using your test-helper, time to increase timestamp of Ganache.
The problem occurs in the 2nd test, because the timestamp is cumulative.
Is there a way to reset the time to the current time without restarting Ganache?

1 Like

Hi @error,

Welcome to the community :wave:

We can’t undo blocks (go backwards in time), so we can only go forward in time: https://docs.openzeppelin.com/test-helpers/0.5/api#time

Instead of making your tests dependent on a specific time, you can make them depend on a duration.

Hi @error,

Did you need any more information?

Hi @abcoathup,

I think that would be all, thank you for reply :slight_smile:

1 Like