You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
50
+
The test suite uses [mocha](https://www.npmjs.com/package/mocha),
51
+
[async](https://www.npmjs.com/package/async) and
52
+
[should](https://www.npmjs.com/package/should).
51
53
52
54
```
53
-
cd <some-directory>/node_modules/oracledb
54
-
npm install mocha should async
55
+
cd <some-directory>/node_modules/oracledb
56
+
npm install
55
57
```
56
58
57
-
Note: these are listed in `devDependencies` in `package.json` so `npm
58
-
install` will install them when executed inside a node-oracledb
59
-
package directory.
59
+
Note: Running `npm install` within oracledb/ directory will recompile
60
+
oracledb module and install all its dependent modules which are listed
61
+
in `devDependencies` field in `package.json` file. So 'mocha', 'async'
62
+
and 'should' modules are installed by this command.
60
63
61
-
### 4. Database credentials
64
+
### 1.4 Configure Database credentials
62
65
63
-
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.
66
+
The database credentials for node-oracledb test suite are defined in dbConfig.js file.
67
+
You can set the credentials via environment variables or dbConfig.js file.
64
68
Change the credentials to a user who has privileges to connect and create tables.
65
69
66
70
```
@@ -82,31 +86,42 @@ have been appropriately configured. See
82
86
[Documentation for External Authentication](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth)
83
87
for more details.
84
88
85
-
### 5. Run test suite
89
+
##2. Running tests
86
90
87
-
All tests can be run with:
91
+
### 2.1 Run the complete test suite
92
+
93
+
#### On Unix-like systems
88
94
89
95
```
90
-
cd <some-directory>/node_modules/oracledb
96
+
cd <some-directory>/node_modules/oracledb
91
97
npm test
92
98
```
93
99
94
-
This calls the `test` script defined in `<some-directory>/node_modules/oracledb/package.json`.
95
-
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.
100
+
This calls the `test` script defined in `oracledb/package.json`.
101
+
102
+
#### On Windows
103
+
104
+
```
105
+
cd <some-directory>/node_modules/oracledb
106
+
npm run-script testWindows
107
+
```
96
108
97
-
## Running a single test
109
+
This calls the `testWindows` script defined in `oracledb/package.json`.
110
+
See [npm scripts](https://docs.npmjs.com/misc/scripts) for more infomation
111
+
about how npm handles "scripts" field of package.json.
0 commit comments