Conversation
jchavarri
approved these changes
Nov 20, 2024
Comment on lines
+26
to
+27
| let button = getByRole("FancyButton", container); | ||
| expect(button->innerHTML)->toBe("Click me"); |
Collaborator
There was a problem hiding this comment.
Shouldn't we test here something about the ref? This test just shows that Button_with_ref is rendering ok.
Member
Author
There was a problem hiding this comment.
Sure, added another assertion but didn't want to go to clicks and other events to keep the test simple and fast
Collaborator
There was a problem hiding this comment.
Thanks. (I think the expect in line 27 can be removed, because it doesn't test anything related to the ref)
Member
…esting-libraries
* '19' of github.com:/reasonml/reason-react:
Add deprecations on ReactDOMTestUtils
Add uri comment back on action
Update src/React.re
Update src/React.re
Update src/React.re
Snapshot with lower {}
…on-react into replace-testing-libraries * 'replace-testing-libraries' of github.com:/reasonml/reason-react: Bind React.act and React.actAsync
…on-react into ref-as-valid-prop
* 'replace-testing-libraries' of github.com:/reasonml/reason-react:
Bind React.act and React.actAsync
Bind React.act and React.actAsync
Add deprecations on ReactDOMTestUtils
Add uri comment back on action
Add comment on install --force
Remove jest from demo/dune
Update src/React.re
Update src/React.re
Update src/React.re
Snapshot with lower {}
…lid-prop * '19' of github.com:/reasonml/reason-react: Replace react dom's testing library with ReactTestingLibrary (#859)
2d60883 to
15e0877
Compare
davesnx
added a commit
that referenced
this pull request
Nov 25, 2024
…ises-as-annotations * '19' of github.com:/reasonml/reason-react: Enable ref as valid prop (#862) Replace react dom's testing library with ReactTestingLibrary (#859) Add deprecations on ReactDOMTestUtils Add uri comment back on action Update src/React.re Update src/React.re Update src/React.re Snapshot with lower {}
Merged
davesnx
added a commit
that referenced
this pull request
Apr 3, 2025
* Add useTransition with async support
* Add useTransitionAsync into the interface
* Add useOptimistic
* Rename use to usePromise and add useContext
* Move useTransitionAsync to Experimental
* Add formStatus to interface
* Leftover from removing useTransitionAsync to Experimental
* Add action_ and action_Async in ReactDOM props
* Fix reference to function on formStatus
* Embed FormData for now
* Add test of Form with useOptimistic
* Embed FormData into ReactDOM
* Move formStatus into ReactDOM
* Run formatter
* Bind React.useActionState instead of ReactDOM.useFormState
* Remove React.use being 'a => 'b
* Revert change on ReactDOM's prop 'action'
* useAction state published in React.rei
* Remove React.use being 'a => 'b
* Use act from 'react' inseat of react-dom/test-utils
* Snapshot with lower {}
* Update src/React.re
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
* Update src/React.re
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
* Update src/React.re
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
* Add uri comment back on action
* Add deprecations on ReactDOMTestUtils
* Replace react dom's testing library with ReactTestingLibrary (#859)
* Install melange-testing-library
* Install melange-testing-library npm deps
* Vendor melange-testing-library
* Fix Form__test with RTL
* Start migrating Hooks__test
* Remove dependency
* Remove unused code from Form__test
* Add a jest-devtoolsgs
* Add a jest-devtools
* Migrate Hooks and Form into RTL
* Add demo to manually test easily
* Use Uncurried for tests
* Migrate all React__test
* Force install since we are dealing with R19
* Snapshot with lower {}
* Remove jest from demo/dune
* Add comment on install --force
* Bind React.act and React.actAsync
* Bind React.act and React.actAsync
* Use React.act as async version only
* Test react.act and react.actasync
* Fix hola test :(
* Enable ref as valid prop (#862)
* Install melange-testing-library
* Install melange-testing-library npm deps
* Vendor melange-testing-library
* Fix Form__test with RTL
* Start migrating Hooks__test
* Remove dependency
* Remove unused code from Form__test
* Add a jest-devtoolsgs
* Add a jest-devtools
* Migrate Hooks and Form into RTL
* Add demo to manually test easily
* Use Uncurried for tests
* Migrate all React__test
* Force install since we are dealing with R19
* Snapshot with lower {}
* Enable ref in ppx
* Add jest test for ref
* Remove jest from demo/dune
* Add comment on install --force
* Improve test from checking ref
* Bind React.act and React.actAsync
* Bind React.act and React.actAsync
* Migrate custom childrens test to RTL
* Fix role for React__test
* Rollback change on _ppx
* Install latest react version with the useState fix
* Use React@19.1.0
---------
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
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.
Depends on #859, that depends on #846
Allows to have a prop with
~refThis PR also adds the cleanup function on
refas a new constructor: added another "constructor" instead of changing the current callbackRef to avoid a breaking change, we might add deprecations and further cleanup in the future versions to keep those constructors to the minimum