The test suite uses [mocha](https://www.npmjs.com/package/mocha), [async](https://www.npmjs.com/package/async) and [should](https://www.npmjs.com/package/should). These need to be installed separately.
The database credentials for node-oracledb test suite are defined in dbConfig.js file. You can set the credentials via environment variables or dbConfig.js file.
Change the credentials to a user who has privileges to connect and create tables.
This calls the `test` script defined in `<some-directory>/node_modules/oracledb/package.json`.
If `mocha` is not in the directory specified in `package.json`, for example if you have installed it globally, then edit `package.json` and change the path.
## Running a single test
Individual tests can be run using:
```
cd <some-directory>/node_modules/oracledb
../mocha/bin/mocha test/<test-name>
```
See [mochajs.org](http://mochajs.org/) for more information on running tests with mocha.
## Adding Tests
See [CONTRIBUTING](https://github.com/oracle/node-oracledb/blob/master/CONTRIBUTING.md) for general information on contribution requirements.
For easy correlation between results and test code, each test is
assigned a number. The following number ranges have been chosen:
- 1 - 20 are reserved for basic functional tests
- 21 - 50 are reserved for data type supporting tests