Skip to content
zoe-1 edited this page Mar 28, 2015 · 11 revisions

Lesson Objectives

  • Use Travis CI to automate testing of your project.
    Read more at: Travis CI
  • Learn basics of hapijs testing utility "lab".
    Read more about lab at: hapijs / lab
  • Use "code" BDD assertion library with "lab".
    Read more about code at: hapijs / code
  • Learn to use lab and code requiring 100% test coverage and linting with default rules.
  • Write basic tests to verify our plugin works.
  • Create a standard hapi.js Makefile to make it easy to generate testing reports (Example: HTML coverage report).
  • Use npm to install new packages and modify your package.json file.

Contents

  1. git setup
  2. Configure for Travis
  3. Install Packages Using npm
  4. Refactor Start Up Process
  5. Testing with lab and code
  6. Export init() from ./lib/index.js and invoke the init() from start.js.
    start.js should be located in the root directory of the project.
  7. Write test

Clone this wiki locally