Saturday, 4 July 2020

What is the execution flow of mocha.js?

Hello, I'm follwing one of the node tutorials, where autor use mocha to do some testing. I've got two test files, one named create_test.js and test_helper.js. In the second one I'm establishing connection to MongoDB server and calling beforeEach hook. My question is, how do mocha knows to execute test_helper.js file first (becouse it is crucial to connect to database first)? Doest the ending of this file (_helper.js) tell something to mocha?

Submitted July 05, 2020 at 07:07AM by bartekw2213

No comments:

Post a Comment