GithubHelp home page GithubHelp logo

wyze / bs-react-testing-library Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 17.0 648 KB

BuckleScript bindings for react-testing-library.

Home Page: https://yarn.pm/bs-react-testing-library

License: MIT License

Reason 99.82% JavaScript 0.18%

bs-react-testing-library's Introduction

Neil Kistner (wyze)

overview languages

bs-react-testing-library's People

Contributors

benadamstyles avatar denis-ok avatar jihchi avatar johnridesabike avatar wyze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bs-react-testing-library's Issues

examples of using debug?

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

Move to JS X 3

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.

Migrating to the new syntax and @rescript/react

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?

Simulate.click is not defined

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

How do we add an options object to *ByRole queries?

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

Invitation to move to testing-library org

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.

Error: package bisect_ppx not found or built

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.