This is a presentation about testing JavaScript in various environments. All tests use mocha as the test runner and chai as the assertion framework.
Start folder:
- Node
- the Browser
- CI (Karma runs in a headless browser from the command-line)
Compare your results to the done folder.
- add.js: a straight return
- subtract.js: a callback function
- multiply.js: returns a promise
- divide.js: can your test spot the error in this class?
- ajax-lib.js: mock network call