-
Notifications
You must be signed in to change notification settings - Fork 217
Testing
Vitaly Tomilov edited this page May 20, 2018
·
8 revisions
- 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 while using the Native Bindings, run:
$ npm run test:native
- To run all tests with coverage:
$ npm run coverage
To generate documentation, you can run:
$ npm run doc
You can run all ESLint checks via the following command:
$ npm run lint
If you are making changes to the TypeScript part of the library, make sure to run this:
$ npm run tslint
pg-promise