September 2018
Intermediate to advanced
328 pages
9h 10m
English
To run the tests, open a terminal instance in the /chapter-09-node/testing-example folder and run the following command:
npm test
You should see the following output in your terminal:
main.wasm Tests the _addTwoNumbers function ✓ returns 300 when 100 and 200 are passed in (4ms) ✓ returns -20 when -10 and -10 are passed in the _divideTwoNumbers function ✓ returns 10 when 100 and 10 are passed in ✓ returns -2 when -10 and 5 are passed in (1ms) ✓ returns ~3.77 when 20.75 and 5.5 are passed in the _findFactorial function ✓ returns 120 when 5 is passed in (1ms) ✓ returns 362880 when 9.2 is passed inTest Suites: 1 passed, 1 totalTests: 7 passed, 7 totalSnapshots: 0 totalTime: 1.008sRan all test suites.
If you have a large number ...
Read now
Unlock full access