Ask a Question

Setting timeout does not work with cucumber-js v7

Occasional Contributor

Setting timeout does not work with cucumber-js v7



I'm busy migrating our tests from v6 to v7.

We set the timeout using the setDefaultTimeout function.

With v6 everything is working fine.

With v7 it seems that setDefaultTimeout is not working, I only get the timeouts to work in step methods when I add { timeout: 60000}.


Any ideas what can be different between v6 and v7?


Regards Marco


I see you found a solution on GitHub here:


Could you please confirm, and maybe explain here? Maybe other users are facing the same issue as you did

Occasional Contributor

As of Cucumber v7 you can not place the setDefaultTimeout inside a hook or step. The first suggestion was to put it in the file where you also create a custom world object. This did not work for me, and I can imagine that not everyone creates custom world object.

After some tries I found out that setDefaultTimeout works when you define the setDefaultTimeout in one of the step files as global function.

Showing results for 
Search instead for 
Did you mean: