DEV Community

Discussion on: How to Test my database layer code in nodejs?

Collapse
 
dmfay profile image
Dian Fay

I use Mocha and Chai and target a separate test database, and run a cleanup script in the after() hook.

If you'd like a more convenient access layer for Postgres but still want it to be easy to run raw SQL, you might be interested in (my project) MassiveJS.

Collapse
 
klvenky profile image
Venkatesh KL

I'll check it out for sure thanks