gengojs-wrappify
An Express, Hapi, an Koa wrapper for the core of gengojs. This module should be used when you need to test your gengojs plugins that need or use the request
object.
The following is an example that shows you to:
- Make sure the plugin has properly loaded
- Make sure that the internal API is properly exposed.
- Make sure that the internal API's API are exposed as well.
Note that there are two version of Wrappify. One is without es6
and the other is.
The example below is with ES6. Therefore, make sure to use the --harmony
flag
when running your tests or use Babel to convert your ES6 code to ES5.
Also note that the wrapper for koa only supports Koa >= v2.0.0
.
var assert = assert;var core = ;var header = ;// Wrappify with harmony// (without harmony would simply be require('gengojs-wrappify'))var wrappify = ; ;