-
Make changes in the
/srcdirectory and runnpm run devto update the files in/lib -
Before sending a pull request for a feature or bug fix, be sure to have tests.
-
Use the same coding style as the rest of the codebase.
-
All pull requests should be made to the
masterbranch.
By default, Knex runs tests against MySQL (using mysql and mysql2), Postgres, and SQLite. The easiet way to run the tests is by creating the database 'knex_test' and granting permissions to the database's default username:
- MySQL: root
- Postgres: postgres
No setup is required for SQLite.
You can optionally specify which dialects to test using the DB environment variable. Values shoud be space separated and can include:
- mysql
- mysql2
- postgres
- sqlite3
- maria
- oracle
$ DB='postgres mysql' npm testIf you'd like to override the database configuration (to use a different host, for example), you can override the path to the default test configuration using the KNEX_TEST environment variable.
$ KNEX_TEST='./path/to/my/config.js' npm test