reasonml / reason-react

Reason bindings for ReactJS

Home Page:https://reasonml.github.io/reason-react/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests

rickyvetter opened this issue · comments

This library is sorely under-tested. Despite having an ever-shrinking runtime I think it's in our best interest to have tests for a number of reasons:

  1. Tests can serve as working examples and additional explanation of features
  2. Tests can prevent and point out breaking changes
  3. Tests can validate that we are binding to React correctly and that we are binding to the correct versions of React

In my ideal world I am imagining three different test suites:

  1. An example project which runs bsb and verifies successful compilation and snapshots JS output. This will verify that any changes to the API are correct and can be used correctly
  2. A suite of JS tests that run on a stable React that we are aiming to support - the goal is to ensure that any runtime errors found in a codebase aren't introduced by these bindings.
    2b. The same suite run against React master to keep tabs on future changes and make sure that breaking changes there can be addressed on our end.

It's on my list to work on this, but I have not started yet. If anyone is interested in getting involved, comment below.

I can start working on that if you like. I so, I think I should start from #552 given this implies a few changes in the bs config.

Yeah - merged those changes just now so feel free to work off of master.