-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: Adds set native value dom util #81
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
=======================================
Coverage 95.92% 95.92%
=======================================
Files 9 9
Lines 319 319
Branches 68 68
=======================================
Hits 306 306
Misses 13 13 ☔ View full report in Codecov by Sentry. |
src/core/utils-dom.ts
Outdated
@@ -7,3 +7,23 @@ import * as React from 'react'; | |||
import { act as reactDomAct } from 'react-dom/test-utils'; | |||
|
|||
export const act = ('act' in React ? React.act : reactDomAct) as typeof reactDomAct; | |||
|
|||
// Copied from @testing-library/dom/dist/events.js |
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.
I'm not sure this is sufficient attribution for the usage. We might need to include the license type as well as a link to the original source code.
Or maybe something similar to what we have here: https://github.com/cloudscape-design/components/blob/main/THIRD-PARTY-LICENSES
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.
Do we have any other examples in the components repo of usages of just a single function being copied in?
4b23257
to
5e569ef
Compare
Required for: cloudscape-design/components#3252
Rel: AWSUI-60345
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.