Use a mocha options file for tests

This commit is contained in:
Christopher Jones 2016-07-18 09:36:25 +10:00
parent 86f4bd28b1
commit f49a26feab
4 changed files with 78 additions and 9 deletions

View File

@ -41,8 +41,8 @@
"async": "^1.5.0"
},
"scripts": {
"test": "mocha -R spec --timeout 100000 test/*.js",
"testWindows": "mocha -R spec --timeout 0 test\\*.js"
"test": "mocha --opts test/opts/mocha.opts",
"testWindows": "mocha --opts test\\opts\\mocha.opts"
},
"engines": {
"node": ">=0.10.28 <7"

View File

@ -145,6 +145,10 @@ assigned a number. The following number ranges have been chosen:
- 21 - 50 are reserved for data type supporting tests
- 51 onwards are for other tests
In order to include your tests in the suite, add each new test file
name to test/opts/mocha.opts. Please also add a description of each
individual test to test/list.txt.
## 4. Test Index
See [`test/list.txt`](https://github.com/oracle/node-oracledb/blob/master/test/list.txt)

View File

@ -286,7 +286,7 @@ Overview of node-oracledb functional tests
14.17 metadata event - single character column
14.18 metadata event - duplicate column alias
15. resultsetToQueryStream.js
15. resultsetToStream.js
15.1 Testing ResultSet.toQueryStream
15.1.1 should allow resultsets to be converted to streams
15.2 Testing ResultSet/QueryStream conversion errors
@ -403,7 +403,7 @@ Overview of node-oracledb functional tests
18.3 binding contants maps correctly
21. datatypeAssist.js
21. dataTypeAssist.js
22. dataTypeChar.js
22.1 testing CHAR data in various lengths
@ -427,11 +427,6 @@ Overview of node-oracledb functional tests
23.2 stores null value correctly
23.2.1 testing Null, Empty string and Undefined
24. dataTypeVarchar2.js
24.1 supports VARCHAR2 data in various lengths
24.2 resultSet stores VARCHAR2 data correctly
24.3 stores null value correctly
24. dataTypeVarchar2.js
24.1 testing VARCHAR2 data in various lengths
24.1.1 SELECT query

70
test/opts/mocha.opts Normal file
View File

@ -0,0 +1,70 @@
--require should
--require async
--reporter spec
--ui bdd
--timeout 100000
test/connection.js
test/pool.js
test/examples.js
test/binding.js
test/externalAuthentication.js
test/dmlReturning.js
test/autoCommit.js
test/autoCommitForSelect.js
test/columnMetadata.js
test/nullColumnValues.js
test/poolTimeout.js
test/resultSet1.js
test/stream1.js
test/stream2.js
test/resultsetToStream.js
test/promises.js
test/extendedMetaData.js
test/constants.js
test/dataTypeAssist.js
test/dataTypeChar.js
test/dataTypeNchar.js
test/dataTypeVarchar2.js
test/dataTypeNvarchar2.js
test/dataTypeNumber.js
test/dataTypeNumber2.js
test/dataTypeFloat.js
test/dataTypeFloat2.js
test/dataTypeBinaryFloat.js
test/dataTypeBinaryDouble.js
test/dataTypeDate.js
test/dataTypeTimestamp1.js
test/dataTypeTimestamp2.js
test/dataTypeTimestamp3.js
test/dataTypeTimestamp4.js
test/dataTypeTimestamp5.js
test/dataTypeTimestamp6.js
test/dataTypeRowid.js
test/dataTypeClob.js
test/dataTypeBlob.js
test/dataTypeRaw.js
test/plsqlBinding1.js
test/plsqlBinding2.js
test/instanceof.js
test/accessTerminatedPoolAttributes.js
test/getConnAfterPoolTerminate.js
test/poolValidityAfterFailingTerminate.js
test/releaseAfterFailingTerminate.js
test/resultSet2.js
test/fetchAs.js
test/nestedCursor.js
test/properties.js
test/lobResultSet.js
test/clobPlsqlString.js
test/checkClassesTypes.js
test/lobProperties.js
test/autoCommit4nestedExecutes.js
test/sqlWithWarnings.js
test/uninitializedLob.js
test/writableProperties.js