-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mitigate mysterious Vitest + Webkit + Vue environment flakiness (#165)
* Fix: dedupe Vite dependency in yarn.lock It’s unclear why both versions made it through the last round of updates. This is *possibly* related to some of the flakiness we’re seeing, but it’s safe either way. Presumably `postcss` is also deduped as a transitive dep somewhere? Shrug emoji! * Mitigation: web-forms/vue/vitest/webkit flakiness (1 of 2) Adds a bit of delay in global setup if the test run is in webkit, and if there’s not already a `.vite/deps` cache (as a heuristic to differentiate first/subsequent test runs). * Mitigation: web-forms/vue/vitest/webkit flakiness (2 of 2) For `web-forms` only (as it seems to consistently be the package showing flakiness), and for `webkit` runs only (same reasoning), attempt test run a second time if first run fails.
- Loading branch information
1 parent
8348215
commit d1d31ea
Showing
4 changed files
with
38 additions
and
14 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
7 changes: 7 additions & 0 deletions
7
packages/web-forms/tests/globalSetup/mitigate-webkit-flakiness.ts
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const sleep = async (milliseconds: number) => { | ||
return new Promise((resolve) => setTimeout(resolve, milliseconds)); | ||
}; | ||
|
||
export default async function () { | ||
await sleep(250); | ||
} |
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