You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chai.js
hello, i want to implement mocha and chai in my hapi.js api code so how i start it
Robin
unread,
Oct 18, 2020, 12:18:57 PM10/18/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chai.js
I'm pretty sure you DON'T want to have mocha and chai in your hapi code. Hapi will be used to build and configure a server in code, and the module dependency saved for production use (`npm i -S hapi`) - your mocha/chai should be separate and only used for testing/CI (`npm i -D mocha chai`). Any time you find yourself writing a function in your hapi code, extract it to a library file and import it into your hapi code, that way you can also import the same function into your mocha/chai test code and write tests as required.