-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make it().timeout() work again #4599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should have thought to proxy the return value too in the PR that provoked this fix...
No sorry, I'm wrong. But then your test doesn't prove that your fix is working, @alexander-fenster. |
@juergba Oops, you're right. I updated the test fixture to do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-fenster thanks for this PR.
I would prefer putting the tests to a different location.
We already have some tests for our require interface
(from #4574):
- test/integration/common-js-require.spec.js
- test/integration/fixtures/common-js-require.fixture.js
Please just append a timeout
and retries
test to our existing tests. Thank you.
@juergba Done, please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-fenster thank you.
The cancelled browser test is off-topic.
Requirements
Description of the Change
Fixes #4598. The code change in #4574 had a breaking change: constructs like
it(...).timeout(...)
,it(...).retries(...)
, etc. stopped working.Replacing
exports.it = context.it || context.test;
withchanges the return value of
it()
toundefined
, thus introducing a breaking change in the patch release.This PR brings this functionality back, and adds an integration test.
Alternate Designs
None. This is a breaking change in a patch release. The behavior, albeit undocumented officially, is widely used (see this StackOverflow answer, for example).
Why should this be in core?
Just bringing back the old behavior.
Benefits
No breaking change :)
Possible Drawbacks
None that I'm aware of.
Applicable issues
#4598