After following the setup process outlined in this guide: https://medium.com/developer-circles-lusaka/how-to-write-an-express-js-server-using-test-driven-development-921dc55aec07, I have configured my environments accordingly.
Utilizing the config package, I am able to select the desired environment for my tasks.
One task I am looking to accomplish is populating the database before each test runs. It seems feasible to achieve this using Mocha's beforeEach() hook since I am utilizing Mocha as my test runner.
My inquiry pertains to an effective method of loading a bulk amount of data into the database simultaneously (I am working with Mongoose). Is there a preferred way to do this without the need to specify Mongoose during insertion? Additionally, I am aiming to store and execute this process in a separate file from the actual tests.