rescript-test
rescript-jest
Our great sponsors
rescript-test | rescript-jest | |
---|---|---|
3 | 2 | |
76 | 293 | |
- | - | |
4.9 | 5.4 | |
6 days ago | 6 days ago | |
ReScript | ReScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rescript-test
-
Testing in ReScript
Besides bindings for JavaScript libraries, there is rescript-test - a lightweight test framework written in ReScript for ReScript. I have heard that some people like it, but for me, it lacks coverage output and Wallaby support.
-
The REGAL Architecture
As soon as you need to change the name or something, delete a field, or change a field… you’ve broken the API. This means you first need to change your Lambda(s) that use this new data, and ensure your unit tests (using ReTest) pass, and your integration tests (using Mocha & JavaScript) which invoke your Lambdas directly on a QA server still work.
-
Parsing Lambda Error Logs in ReScript & Python
To do that, we’re using rescript-test, which feels natural to those used to Jest, Mocha, etc. The only main difference is using testAsync vs test for async code, and having to define your own assertions vs. “Jest/Chai has ALL THE THINGS”.
rescript-jest
-
Testing in ReScript
Another popular option is to use bindings for Jest. However, in my opinion, Jest is a monstrous combine that is slow, has a hacky mock system, bad ESM support, and purely tries to mimic DOM API with JSDOM. AVA literally doesn't have any of these. Also, the available Jest bindings don't allow doing multiple assertions per test, which is often useful to me.
-
How I Switched from TypeScript to ReScript
In order to write tests in ReScript, and thus test your code directly, you can use bs-jest, which provides ReScript bindings to Jest. If you prefer, you can also use the slightly less mature bs-mocha. You can also test the generated JavaScript or TypeScript files with no extra configuration.
What are some alternatives?
rescript-stdlib-vendorer - Tool to support usage of a vendored standard library in ReScript
rescript-react-realworld-example-app - An exemplary real-world application built using ReScript and React
rescript-schema - The fastest composable parser/serializer for ReScript (and TypeScript)
rescript-sublime - Official Sublime Text plugin for ReScript.
aws-appsync-community - The AWS AppSync community
rescript-apollo-client - ReScript bindings for the Apollo Client ecosystem
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
proposal-pipeline-operator - A proposal for adding a useful pipe operator to JavaScript.
elm-graphql - Autogenerate type-safe GraphQL queries in Elm.
rescript-react - Official ReScript bindings for ReactJS
aws-codedeploy-agent - Host Agent for AWS CodeDeploy