O'Reilly logo

Developing a hapi Edge: A Rich Node.js Framework for Apps and Services by Foreword by Eran Hammer, Lloyd Benson, Daniel Bretoi, Van Nguyen, Wyatt Preul

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Testing

In the last chapter (Chapter 9 Templating), we discovered how to respond to requests with HTML. With that final piece, you can create your own complete, fully functional web application. However, that is not enough! To build real, production-worthy applications, you will need to test your code.

In the hapi universe, testing is extremely important. Testing is important enough to the hapi module maintainers that they developed their own testing library, named lab, in order to get testing right. Before a pull request can be merged into a core module, it must first have working tests as well as 100% test coverage of the code in the module.Therefore, if you plan to contribute back to the community, understanding how hapi tests ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required