Skip to content

Commit f49a26f

Browse files
committed
Use a mocha options file for tests
1 parent 86f4bd2 commit f49a26f

File tree

4 files changed

+78
-9
lines changed

4 files changed

+78
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"async": "^1.5.0"
4242
},
4343
"scripts": {
44-
"test": "mocha -R spec --timeout 100000 test/*.js",
45-
"testWindows": "mocha -R spec --timeout 0 test\\*.js"
44+
"test": "mocha --opts test/opts/mocha.opts",
45+
"testWindows": "mocha --opts test\\opts\\mocha.opts"
4646
},
4747
"engines": {
4848
"node": ">=0.10.28 <7"

test/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ assigned a number. The following number ranges have been chosen:
145145
- 21 - 50 are reserved for data type supporting tests
146146
- 51 onwards are for other tests
147147

148+
In order to include your tests in the suite, add each new test file
149+
name to test/opts/mocha.opts. Please also add a description of each
150+
individual test to test/list.txt.
151+
148152
## 4. Test Index
149153

150154
See [`test/list.txt`](https://github.com/oracle/node-oracledb/blob/master/test/list.txt)

test/list.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Overview of node-oracledb functional tests
286286
14.17 metadata event - single character column
287287
14.18 metadata event - duplicate column alias
288288

289-
15. resultsetToQueryStream.js
289+
15. resultsetToStream.js
290290
15.1 Testing ResultSet.toQueryStream
291291
15.1.1 should allow resultsets to be converted to streams
292292
15.2 Testing ResultSet/QueryStream conversion errors
@@ -403,7 +403,7 @@ Overview of node-oracledb functional tests
403403
18.3 binding contants maps correctly
404404

405405

406-
21. datatypeAssist.js
406+
21. dataTypeAssist.js
407407

408408
22. dataTypeChar.js
409409
22.1 testing CHAR data in various lengths
@@ -427,11 +427,6 @@ Overview of node-oracledb functional tests
427427
23.2 stores null value correctly
428428
23.2.1 testing Null, Empty string and Undefined
429429

430-
24. dataTypeVarchar2.js
431-
24.1 supports VARCHAR2 data in various lengths
432-
24.2 resultSet stores VARCHAR2 data correctly
433-
24.3 stores null value correctly
434-
435430
24. dataTypeVarchar2.js
436431
24.1 testing VARCHAR2 data in various lengths
437432
24.1.1 SELECT query

test/opts/mocha.opts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
--require should
2+
--require async
3+
--reporter spec
4+
--ui bdd
5+
--timeout 100000
6+
7+
test/connection.js
8+
test/pool.js
9+
test/examples.js
10+
test/binding.js
11+
test/externalAuthentication.js
12+
test/dmlReturning.js
13+
test/autoCommit.js
14+
test/autoCommitForSelect.js
15+
test/columnMetadata.js
16+
test/nullColumnValues.js
17+
18+
test/poolTimeout.js
19+
test/resultSet1.js
20+
test/stream1.js
21+
test/stream2.js
22+
test/resultsetToStream.js
23+
test/promises.js
24+
test/extendedMetaData.js
25+
test/constants.js
26+
test/dataTypeAssist.js
27+
test/dataTypeChar.js
28+
29+
test/dataTypeNchar.js
30+
test/dataTypeVarchar2.js
31+
test/dataTypeNvarchar2.js
32+
test/dataTypeNumber.js
33+
test/dataTypeNumber2.js
34+
test/dataTypeFloat.js
35+
test/dataTypeFloat2.js
36+
test/dataTypeBinaryFloat.js
37+
test/dataTypeBinaryDouble.js
38+
test/dataTypeDate.js
39+
40+
test/dataTypeTimestamp1.js
41+
test/dataTypeTimestamp2.js
42+
test/dataTypeTimestamp3.js
43+
test/dataTypeTimestamp4.js
44+
test/dataTypeTimestamp5.js
45+
test/dataTypeTimestamp6.js
46+
test/dataTypeRowid.js
47+
test/dataTypeClob.js
48+
test/dataTypeBlob.js
49+
test/dataTypeRaw.js
50+
51+
test/plsqlBinding1.js
52+
test/plsqlBinding2.js
53+
test/instanceof.js
54+
test/accessTerminatedPoolAttributes.js
55+
test/getConnAfterPoolTerminate.js
56+
test/poolValidityAfterFailingTerminate.js
57+
test/releaseAfterFailingTerminate.js
58+
test/resultSet2.js
59+
test/fetchAs.js
60+
test/nestedCursor.js
61+
62+
test/properties.js
63+
test/lobResultSet.js
64+
test/clobPlsqlString.js
65+
test/checkClassesTypes.js
66+
test/lobProperties.js
67+
test/autoCommit4nestedExecutes.js
68+
test/sqlWithWarnings.js
69+
test/uninitializedLob.js
70+
test/writableProperties.js

0 commit comments

Comments
 (0)