Open dcrays08 opened 1 year ago
I believe last time we had a discussion regarding testing we advocated for integration tests through server.inject
rather than unit testing.
Regarding the way you'd structure the separation is up to you to be honest. Whatever makes sense for your project, maybe that would be test/integration
and test/unit
. To only run the integration test, you can use the -g, --grep
command line option for lab
IIRC. I haven't tested it, I just read documentation.
How do I separate between integration testing and unit testing using Hapi in Node.js?
I am trying to reduce the testing time in our automations for every time we update a unit within our API.
I was wondering can I just create two new folders test/unit and test/int to separate the scripts and what would the update to the package.json require?
I have the following in the package.json which runs the .labrc.js package.json
labrc.js