Tests
rickyvetter opened this issue · comments
Ricky Vetter commented
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:
- Tests can serve as working examples and additional explanation of features
- Tests can prevent and point out breaking changes
- 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:
- 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 - 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.
Matthias Le Brun commented
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.
Ricky Vetter commented
Yeah - merged those changes just now so feel free to work off of master.