forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak test retries for invalid-href suite (vercel#15459)
- Reduce jest retries to 2 for a total of 3 attempts - Disable retries in `invalid-href` test. I noticed jest retries don't help when this test fails (see log output of https://github.com/vercel/next.js/runs/904147534).
- Loading branch information
Showing
2 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import { | |
import webdriver from 'next-webdriver' | ||
import { join } from 'path' | ||
|
||
jest.setTimeout(1000 * 60 * 2) | ||
jest.setTimeout(1000 * 60 * 1) | ||
|
||
let app | ||
let appPort | ||
|
@@ -23,6 +23,10 @@ const appDir = join(__dirname, '..') | |
const firstErrorRegex = /Invalid href passed to router: mailto:[email protected].*invalid-href-passed/ | ||
const secondErrorRegex = /Invalid href passed to router: .*google\.com.*invalid-href-passed/ | ||
|
||
// This test doesn't seem to benefit from retries, let's disable them until the test gets fixed | ||
// to prevent long running times | ||
jest.retryTimes(0) | ||
|
||
const showsError = async (pathname, regex, click = false, isWarn = false) => { | ||
const browser = await webdriver(appPort, pathname) | ||
try { | ||
|