Make test retries configurable and disable when debugging#2873
Open
Make test retries configurable and disable when debugging#2873
Conversation
rajsite
reviewed
Feb 26, 2026
| } | ||
| }, | ||
| define: { | ||
| TEST_RETRY_COUNT: config.retries === undefined ? undefined : JSON.stringify(config.retries) |
Member
There was a problem hiding this comment.
I don't want to rely on a pattern that's vite specific / coupled to build configuration. What I've had on my personal backlog is to turn this into a karma jasmine plugin and configure it that was like any other plug-in. Would have been helpful to chat about it before spending time but I'd like to push back on this implementation direction
rajsite
requested changes
Feb 26, 2026
Member
rajsite
left a comment
There was a problem hiding this comment.
Should discuss implementation direction
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
🤨 Rationale
When debugging a test failure locally, it isn't helpful to retry the test. We really should only be running retries for official validation runs, and arguably for non-debugging, local, test runs (as we likely want the behavior to mirror what happens on build agents).
👩💻 Implementation
jasmine-extensions/src/index.tsnow checks a globalTEST_RETRY_COUNTvariable that is set by Vite (based on--retries=Nargument is passed tokarma start). If a value has been provided, it uses that. Otherwise, we fall back to the standard default of 4 retries (+ the initial run = 5 total runs)--retries=0to the the debugging test commands (inpackage.json) fornimble/ok/spright-components. (The Angular test runner does not use Vite, so we can't do the same for those projects.)beforeEachcalls to after the wait, in case the timing between setup and test run matters)🧪 Testing
Manual testing