September 2018
Intermediate to advanced
328 pages
9h 10m
English
The only dependency we'll use for this example is Jest, a JavaScript testing framework built by Facebook. Jest is an excellent choice for testing because it includes most of the features you'll need out of the box, such as coverage, assertions, and mocking. In most cases, you can use it with zero configuration, depending on the complexity of your application. If you're interested in learning more, check out Jest's website at https://jestjs.io. Open a terminal instance in the /chapter-09-node/testing-example folder and run the following command to install Jest:
npm install
In the package.json file, there are three entries in the scripts section: build, pretest, and test. The build script executes the emcc command with ...
Read now
Unlock full access