Home How to access/connect postgres database with "Mocha" testing framework
Reply: 0

How to access/connect postgres database with "Mocha" testing framework

Aman
1#
Aman Published in 2017-12-07 07:15:35Z

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

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.259575 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO