-
Notifications
You must be signed in to change notification settings - Fork 470
test: add type tests for within #1044
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
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 3dca6f9:
|
Codecov Report
@@ Coverage Diff @@
## main #1044 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 25
Lines 920 920
Branches 284 284
=========================================
Hits 920 920
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
types/__tests__/type-tests.ts
Outdated
@@ -228,6 +229,18 @@ export async function testWaitFors() { | |||
await waitFor(async () => {}) | |||
} | |||
|
|||
export async function testWithin() { | |||
const sut = within(document.body) |
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.
What is "sut"?
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.
It's an abbreviation for "System Under Test", I couldn't think of a better name.
I can change it if you want though.
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.
please 😄
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.
No problem, renamed to container
.
🎉 This PR is included in version 8.7.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Follow up to #1034
Why:
I wanted to add generics to the within queries, but they already accept a generic.
I think adding a few tests could be helpful for potential changes in the future.
How:
Added a few tests and saw that the tests were passing
Checklist:
docs site
cc @nstepien