forked from outmoded/university
-
Notifications
You must be signed in to change notification settings - Fork 0
3 Assignment
zoe-1 edited this page Mar 28, 2015
·
11 revisions
- 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.
- git setup
-
Configure for Travis
- Install Packages Using npm
- Refactor the server.init() method to accept port and callback parameters.
The callback() will gracefully handle any error state as well as reference the server object.
Additionally, this callback allows us stop the server when running tests.
- 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. - Write test