The simplest Continuous-Integration example for Node.js
-
Install the Node package manager:
brew install npm
-
Install Jest (a popular JavaScript Testing Framework):
npm install --save-dev jest
-
Check the install by running the tests:
npm testIf all is well, you should see output similar to this:
$ npm test > test > jest PASS ./sum.test.js ✓ adds 1 + 2 to equal 3 (1 ms) Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: 0.163 s Ran all test suites.
Adapted from Jest's Getting Started tutorial.