February 2019
Beginner to intermediate
180 pages
4h 4m
English
Just like any other package, we start with the Reason Package Index (or Redex, for short).
Typing in jest reveals the bs-jest bindings to Jest. Following the installation instructions for bs-jest, we first install bs-jest with npm:
npm install --save-dev @glennsl/bs-jest
Then we let BuckleScript know about this dev dependency by including it in bsconfig.json. Notice that the key is "bs-dev-dependencies" and not "bs-dependencies":
"bs-dev-dependencies": ["@glennsl/bs-jest"]
Since bs-jest lists jest as a dependency, npm will install jest as well, and we don't need to include jest as a direct dependency of our application.
Let's now create a __tests__ directory as a sibling of the ...
Read now
Unlock full access