Skip to content
JavaScript Testing in Node, the Browser, and CI
JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

JavaScript Testing in Node, the Browser, and CI

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:

  1. Node
  2. the Browser
  3. CI (Karma runs in a headless browser from the command-line)

Compare your results to the done folder.

Testing scenarios

  • 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
You can’t perform that action at this time.