-
Notifications
You must be signed in to change notification settings - Fork 470
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: Pass container from findBy through to waitFor #868
fix: Pass container from findBy through to waitFor #868
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 50c6353:
|
@@ -89,6 +90,12 @@ function waitFor( | |||
await new Promise(r => setImmediate(r)) | |||
} | |||
} else { | |||
try { |
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.
This change was needed to keep these warnings intact. Without it, getWindowFromNode(container)
throws and the error messages do not match the expected error. I thought it best to keep the warnings/behavior the same rather than update the test snapshots to match the new error message.
Worth noting that I had to commit with
|
Hi @nathanforce could you please rebase this branch with master? |
Codecov Report
@@ Coverage Diff @@
## master #868 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 946 951 +5
Branches 291 291
=========================================
+ Hits 946 951 +5
Continue to review full report at Codecov.
|
@all-contributors add @nathanforce for code |
@nathanforce Thanks! |
I've put up a pull request to add @nathanforce! 🎉 |
🎉 This PR is included in version 7.29.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Pass
container
fromfindBy
into thewaitFor
call to support usingfindBy
in non-global DOM environments.Why:
The library should be agnostic of the runtime environment/globals when passing in a
container
.How:
It looks like there are sensible defaults for
container
throughout the call stack, so I've just ferried the argument through.Checklist:
docs site n/a