Comments (3)
I haven't actually done any Reason with interactivity, only rendering content. I misread what was going on with Simulate
and that it isn't actually exposed.
I think the proper thing to do is move that binding into the bs-dom-testing-library and then expose it here as well. I believe that is how the JavaScript libraries are handling it.
I'd be willing to accept any PRs if you would like to contribute!
from bs-react-testing-library.
This is resolved in v0.4.0.
You can now do something similar to the following:
/*
* Counter has structure like so:
*
* <div onClick={self.increment}>{state.count}</div>
**/
/* Test */
open Jest;
test("it responds to click event", () => ReactTestingLibrary.({
let component = render(<Counter />);
component
|> getByText(~matcher=`Str("0"))
|> FireEvent.click;
component
|> getByText(~matcher=`Str("1"))
|> expect
|> ExpectJs.toBeTruthy;
}));
from bs-react-testing-library.
Thank you!
from bs-react-testing-library.
Related Issues (9)
- Move to JS X 3 HOT 3
- FireEvent HOT 5
- How to use findBy* functions? HOT 1
- Error: package bisect_ppx not found or built HOT 2
- How do we add an options object to *ByRole queries? HOT 3
- examples of using debug? HOT 1
- Migrating to the new syntax and @rescript/react
- Invitation to move to testing-library org HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bs-react-testing-library.