Skip to content

Testing

Vitaly Tomilov edited this page Jul 9, 2017 · 8 revisions

testing the library

  • Clone the repository (or download, if you prefer):
$ git clone https://github.com/vitaly-t/pg-promise
  • Install the library's DEV dependencies:
$ npm install
  • Make sure all tests can connect to your local test database, using the connection details in test/db/header.js. Either set up your test database accordingly or change the connection details in that file.

  • Initialize the database with some test data:

$ node test/db/init.js
  • To run all tests:
$ npm test
  • To run all tests with coverage:
$ npm run coverage
Clone this wiki locally