Test.timeouts Method

Customize timeout values for requests performed during a test.

    [, pageRequestTimeout]
    [, ajaxRequestTimeout]
}) → this
Parameter Type Description
pageLoadTimeout (optional) number Maximum time (in milliseconds) between theDOMContentLoaded event and the window.load event. See pageLoadTimeout.
pageRequestTimeout (optional) number Maximum time (in milliseconds) for the web server to serve an HTML page. See pageRequestTimeout.
ajaxRequestTimeout (optional) number Maximum time (in milliseconds) between a fetch/XHR request and the response. See ajaxRequestTimeout.

test('My test', async () => {
    /* ... */
    pageLoadTimeout:    2000,
    pageRequestTimeout: 60000,
    ajaxRequestTimeout: 60000,