hapijs / glue

Server composer for hapi.js
Other
245 stars 62 forks source link

Using Glue with Lab #69

Closed sean-hill closed 8 years ago

sean-hill commented 8 years ago

Hey, in all the examples for unit testing an API using the Lab library, they require their index.js file and use module.exports = server to get access to the server in their tests. However, with Glue we are handed back the server in the callback. How would it be possible to use these two libraries together?

vdeturckheim commented 8 years ago

Yes, you can see my example (old glue syntax) here.

devinivy commented 8 years ago

This becomes more complicated when you want to use the same server throughout many tests. I created a utility named labbable with this exact use-case in mind, https://github.com/devinivy/labbable#with-glue.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.