diff --git a/packages/cli/e2e-test/helpers.js b/packages/cli/e2e-test/helpers.js index 30e4770c01..ed3b7914cc 100644 --- a/packages/cli/e2e-test/helpers.js +++ b/packages/cli/e2e-test/helpers.js @@ -106,7 +106,7 @@ async function waitForPageWithText( } catch (error) { if (error.message.match(EXPECTED_LOAD_ERRORS)) { loadAttempts++; - if (loadAttempts > maxLoadAttempts) { + if (loadAttempts >= maxLoadAttempts) { throw new Error( `Failed to load page '${path}', max number of attempts reached`, );