fix jasmine afterTest hook#11625
Merged
christian-bromann merged 2 commits intowebdriverio:mainfrom Nov 8, 2023
Merged
Conversation
packages/wdio-utils/src/shim.ts
Outdated
| */ | ||
| // @ts-expect-error | ||
| const _timeout = this?._runnable?._timeout || globalThis.jasmine?.DEFAULT_TIMEOUT_INTERVAL || timeout | ||
| const _timeout = (this?._runnable?._timeout || globalThis.jasmine?.DEFAULT_TIMEOUT_INTERVAL || timeout) - 3 |
Member
There was a problem hiding this comment.
Do we know that 3ms are enough for this to not happen? It seems a bit arbitrary.
Member
Author
There was a problem hiding this comment.
It does not need to be precisely 3ms. It just needs to be a shorter duration than the overall timeout. So, I've used 3ms, making sure it doesn't disrupt the timeouts set & execution timeline.
Member
There was a problem hiding this comment.
Can we move the 3 to a const at the top of the file with a descriptive name and a comment as to why the value is chosen? I think it would greatly help anyone stumbling over it in the future.
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.
Proposed changes
Fixes #11495
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers