Skip to content

Commit 67804fd

Browse files
committed
Add sanity tests for oracledb.events
1 parent 04af720 commit 67804fd

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

test/list.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ Overview of node-oracledb functional tests
930930
58.1.26 oracleClientVersionString (read-only)
931931
58.1.27 edition
932932
58.1.28 Negative - edition
933+
58.1.29 events
934+
58.1.30 Negative - events
933935
58.2 Pool Class
934936
58.2.1 poolMin
935937
58.2.2 poolMax

test/properties.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ describe('58. properties.js', function() {
5959
defaultValues.poolPingInterval = oracledb.poolPingInterval;
6060
defaultValues.fetchAsBuffer = oracledb.fetchAsBuffer;
6161
defaultValues.edition = oracledb.edition;
62+
defaultValues.events = oracledb.events;
6263
});
6364

6465
after('restore the values', function() {
@@ -80,6 +81,7 @@ describe('58. properties.js', function() {
8081
oracledb.poolPingInterval = defaultValues.poolPingInterval;
8182
oracledb.fetchAsBuffer = defaultValues.fetchAsBuffer;
8283
oracledb.edition = defaultValues.edition;
84+
oracledb.events = defaultValues.events;
8385
});
8486

8587
it('58.1.1 poolMin', function() {
@@ -334,6 +336,23 @@ describe('58. properties.js', function() {
334336
);
335337
});
336338

339+
it('58.1.29 events', function() {
340+
var t = oracledb.events;
341+
oracledb.events = true;
342+
343+
should.strictEqual(t, false);
344+
should.strictEqual(oracledb.events, true);
345+
});
346+
347+
it('58.1.30 Negative - events', function() {
348+
should.throws(
349+
function() {
350+
oracledb.events = 'hello';
351+
},
352+
/NJS-004: invalid value for property events/
353+
);
354+
});
355+
337356
}); // 58.1
338357

339358
describe('58.2 Pool Class', function() {

0 commit comments

Comments
 (0)