I am new to Postgres and Mocha, How we can connect postgres database with "Mocha" testing framework. I have referred this URL [link]https://node-postgres.com/api/client for a way to connect. What I have understood is first we need to create a config file with database connection details and create db.js file for querying db. Here they have explained pg pool and Pg client, what is the difference between them. Help me in finding a way to connect postgres with Mocha. Can any one explain in detail?
I have found this URL [link]Mocha/Node.js/PostgreSQL integration testing useful but they didn't mention config.js file. Can anyone share config.js file with dummy db details