BlackBoxVision / typescript-hapi-starter

🚀 Starter for building APIs with Hapi + Typescript!
MIT License
128 stars 28 forks source link

Add tap for running tests #30

Closed laurilarjo closed 4 years ago

laurilarjo commented 4 years ago

Hi @JonatanSalas I noticed you had added tests to the project, but I couldn't run them. Maybe you had used globally installed tap?

When I tried to run the test npm script it failed with multiple reasons:

Now I added tap to the dev-dependencies, and a script command to run them, and it works (although many tests still fail).

So I assume that not everything was finished with that nyc setup, or the tests? However the tap includes a coverage report out of the box, so to keep things simple that could be used on its own. I'll leave that for you to decide, as I don't know what that original test command produces.

Did you have all the tests passing? For me it shows 4 asserts fail, 6 pass, 2 skip. I haven't yet looked into why.

laurilarjo commented 4 years ago

If I get the test running and comfortable that the project works for me, then I can start merging these security updates.

JonatanSalas commented 4 years ago

@laurilarjo that's great! There was an on going refactoring that I have to leave because of some other things that came up, feel free to make those tests running accordangly.

Also, thanks for your contribution to this project!