🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@rescriptbr/testing-library

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rescriptbr/testing-library

ReScript bindings for react-testing-library

1.0.0
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
3
Weekly downloads
 
Created
Source

@rescriptbr/react-testing-library ·

ReScript bindings for react-testing-library.

Documentation

The documentions is WIP, see src/__tests__ for some examples.

Installation

$ yarn add --dev @rescriptbr/react-testing-library

# or..

$ npm install --save-dev @rescriptbr/react-testing-library

Usage

Add to bsconfig.json

{
  "bs-dev-dependencies": [
    "@rescriptbr/react-testing-library"
  ]
}

With bs-jest

open Jest
open Expect
open ReactTestingLibrary

test("Component renders", () =>
  <div style=ReactDOM.Style.make(~color="rebeccapurple", ())>
    <h1> {React.string("Heading")} </h1>
  </div>
  |> render
  |> container
  |> expect
  |> toMatchSnapshot
)

Examples

See src/__tests__ for some examples.

Development

$ git clone https://github.com/wyze/bs-react-testing-library.git
$ cd bs-react-testing-library
$ yarn # or `npm install`

Build

$ yarn build

Test

$ yarn test

Change Log

Full Change Log

v1.0.0 (2021-04-21)

License

MIT ©

Keywords

bucklescript

FAQs

Package last updated on 21 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts