Giter Site home page Giter Site logo

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

View Code? Open in Web Editor NEW

This project forked from wyze/bs-react-testing-library

0.0 2.0 0.0 264 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

bs-react-testing-library · Build Status npm Codecov

BuckleScript bindings for react-testing-library.

Documentation

Read the docs | Edit the docs

Installation

$ yarn add --dev bs-react-testing-library

# or..

$ npm install --save-dev bs-react-testing-library

Usage

Add to bsconfig.json

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

With bs-jest

/* Component_test.re */

open Jest;
open Expect;
open ReactTestingLibrary;

test("Component renders", () =>
  <div style=ReactDOMRe.Style.make(~color="rebeccapurple", ())>
    <h1> {ReasonReact.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

v0.7.2 (2020-04-13)

  • Fix bsconfig.json to allow test command to run (@wyze in 48b5343)
  • Run bisect conditionally (@wyze in #20)

License

MIT © Neil Kistner

bs-react-testing-library's People

Contributors

benadamstyles avatar jihchi avatar wyze avatar

Watchers

 avatar  avatar

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.