OpenZeppelin Test Environment: Timeout exceeding 2000ms

Hi @Jshanks21,

The default timeout in mocha is 2000ms.

The first run of beforeEach I get a duration (ms) ~1200
The beforeEach is deploying a token and a smart contract so takes a little bit of time.

I reproduced by adding a sleep await new Promise(r => setTimeout(r, 2000));

As you have done, you can disable timeouts using this.timeout(0) or you could increase the timeout.
https://mochajs.org/#suite-level


As an aside, I use Windows Subsystem for Linux, and I would recommend using WSL (I haven't tried WSL2 yet). So much of the ecosystem is unix based, so I run into far fewer issues using WSL.

3 Likes