wyze / bs-react-testing-library Goto Github PK
View Code? Open in Web Editor NEWBuckleScript bindings for react-testing-library.
Home Page: https://yarn.pm/bs-react-testing-library
License: MIT License
BuckleScript bindings for react-testing-library.
Home Page: https://yarn.pm/bs-react-testing-library
License: MIT License
I couldn't figure it out. Any advice?
I have a branch where I was working on a transition to JSX 3, and I am having some trouble figuring out how to invoke FireEvent. After reading the source, it seems that it should correctly link to bs-dom-testing-library
, will look into it more.
Feel free to checkout the FireEvent
example I have up.
https://github.com/justinba1010/bs-react-testing-library/tree/jsx3-fire-event
Hello, curious if you have any examples of how to use the debug() function w/ this library?
either by itself (debug the whole dom tree) or w/ an element passed in.
many thanks
Are there any plans to transition to JS X
version 3? I am working on a branch now, and wanted to know if I should put up a PR, to get some feedback back on it.
Hey, first of all thanks for your working on this bindings ๐๐ป
I'm opening this issue to discuss the migration from reason-react
to @rescript/react
and the syntax migration from .re
to .res
. Are you planning something like that?
Currently click
event is possible via Simulate.click
. Internally it binds to
[@bs.module "react-testing-library"] [@bs.scope "Simulate"]
external click : Dom.element => unit = "";
which throws error.
Correct way should be to do:
[@bs.module "react-testing-library"] [@bs.scope "fireEvent"]
external click: Dom.element => unit = "";
based on the example in the react-testing-library README
I've seen people do |> getByRole(~matcher=`Str("heading"), ~options=?None)
but I can't find anyone actually submitting options. I have tried:
|> getByRole(~matcher=`Str("heading"), ~options=?Some({"level": 3}))
|> getByRole(~matcher=`Str("heading"), ~options=Some({"level": 3}))
|> getByRole(~matcher=`Str("heading"), ~options=?Some(`Obj({"level": 3})))
etc but I can't get it to compile. How do we enter the options?
Thank you
It's up to you, but if you'd like, you're welcome to transfer this repository to the testing-library organization on GitHub. This will give your project more credibility as part of the testing-library family of projects with a unified mission of tools which help people avoid testing implementation details.
Again, totally up to you. I just want you to know we appreciate all you've done and you're welcome to join us if you like.
Not a big deal, just confusing as it's nowhere mentioned, I've even checked other repos using bs-react-testing-library
, many don't have bisect_ppx
as a dependency, yet I wasn't able to build after adding bs-react-testing-library
to my project without adding bisect_ppx
as well ๐คทโโ๏ธ
{
"name": "top-secret",
"reason": { "react-jsx": 3 },
"bsc-flags": ["-bs-super-errors"],
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"package-specs": [
{
"module": "es6",
"in-source": true
}
],
"suffix": ".bs.js",
"namespace": true,
"bs-dependencies": ["reason-react"],
"bs-dev-dependencies": ["@glennsl/bs-jest", "bs-react-testing-library"],
"warnings": {
"number": "+R",
"error": "+R"
},
"ppx-flags": ["bisect_ppx/ppx"],
"refmt": 3
}
I just started with Reason and all its chain this morning so .. ๐
Couldn't not mention it somewhere, as info or question.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.