@@ -30,12 +30,20 @@ const oracledb = require('oracledb');
3030const should = require ( 'should' ) ;
3131const assert = require ( 'assert' ) ;
3232const dbconfig = require ( './dbconfig.js' ) ;
33+ const testsUtil = require ( './testsUtil.js' ) ;
3334
34- describe ( '224. booleanBind.js' , ( ) => {
35+ describe ( '224. booleanBind.js' , function ( ) {
3536
3637 let conn ;
38+ let isRunnable = false ;
39+
3740 const pkgName = 'NODB_PKG_TEST_BOOLEANS' ;
38- before ( async ( ) => {
41+ before ( async function ( ) {
42+ isRunnable = await testsUtil . checkPrerequisites ( 1200000000 , 1200000000 ) ;
43+ if ( ! isRunnable ) {
44+ this . skip ( ) ;
45+ }
46+
3947 let plsqlPkg = `
4048 create or replace package ${ pkgName } as
4149
@@ -140,7 +148,11 @@ describe('224. booleanBind.js', () => {
140148 }
141149 } ) ; // before()
142150
143- after ( async ( ) => {
151+ after ( async function ( ) {
152+ if ( ! isRunnable ) {
153+ return ;
154+ }
155+
144156 try {
145157 let plsql = `drop package ${ pkgName } ` ;
146158 await conn . execute ( plsql ) ;
@@ -150,7 +162,7 @@ describe('224. booleanBind.js', () => {
150162 }
151163 } ) ; // after()
152164
153- it ( '224.1 IN bind boolean value' , async ( ) => {
165+ it ( '224.1 IN bind boolean value' , async function ( ) {
154166
155167 let binds = {
156168 inval : true ,
@@ -166,7 +178,7 @@ describe('224. booleanBind.js', () => {
166178 }
167179 } ) ; // 224.1
168180
169- it ( '224.2 IN bind value "false"' , async ( ) => {
181+ it ( '224.2 IN bind value "false"' , async function ( ) {
170182 let binds = {
171183 inval : false ,
172184 outval : { dir : oracledb . BIND_OUT , type : oracledb . STRING , maxSize : 10 }
@@ -181,7 +193,7 @@ describe('224. booleanBind.js', () => {
181193 }
182194 } ) ; // 224.2
183195
184- it ( '224.3 IN bind value "null"' , async ( ) => {
196+ it ( '224.3 IN bind value "null"' , async function ( ) {
185197 let binds = {
186198 inval : { type : oracledb . DB_TYPE_BOOLEAN , val : null } ,
187199 outval : { dir : oracledb . BIND_OUT , type : oracledb . STRING , maxSize : 10 }
@@ -196,7 +208,7 @@ describe('224. booleanBind.js', () => {
196208 }
197209 } ) ; // 224.3
198210
199- it ( '224.4 Negative - IN bind value type mismatch' , async ( ) => {
211+ it ( '224.4 Negative - IN bind value type mismatch' , async function ( ) {
200212 let binds = {
201213 inval : { type : oracledb . DB_TYPE_BOOLEAN , val : 123 } ,
202214 outval : { dir : oracledb . BIND_OUT , type : oracledb . STRING , maxSize : 10 }
@@ -205,7 +217,7 @@ describe('224. booleanBind.js', () => {
205217
206218 try {
207219 await assert . rejects (
208- async ( ) => {
220+ async function ( ) {
209221 await conn . execute ( sql , binds ) ;
210222 } ,
211223 / N J S - 0 1 1 /
@@ -215,7 +227,7 @@ describe('224. booleanBind.js', () => {
215227 }
216228 } ) ;
217229
218- it ( '224.5 OUT bind value "false"' , async ( ) => {
230+ it ( '224.5 OUT bind value "false"' , async function ( ) {
219231 let binds = {
220232 inval : 12 ,
221233 outval : { dir : oracledb . BIND_OUT , type : oracledb . DB_TYPE_BOOLEAN }
@@ -230,7 +242,7 @@ describe('224. booleanBind.js', () => {
230242 }
231243 } ) ; // 224.5
232244
233- it ( '224.6 OUT bind value "true"' , async ( ) => {
245+ it ( '224.6 OUT bind value "true"' , async function ( ) {
234246 let binds = {
235247 inval : 9 ,
236248 outval : { dir : oracledb . BIND_OUT , type : oracledb . DB_TYPE_BOOLEAN }
@@ -245,7 +257,7 @@ describe('224. booleanBind.js', () => {
245257 }
246258 } ) ; // 224.6
247259
248- it ( '224.7 IN bind array with boolean data' , async ( ) => {
260+ it ( '224.7 IN bind array with boolean data' , async function ( ) {
249261 try {
250262 const cls = await conn . getDbObjectClass ( `${ pkgName } .UDT_BOOLEANLIST` ) ;
251263 const arr = new cls ( [ true , false , true , true , false , true , false , true ] ) ;
@@ -261,7 +273,7 @@ describe('224. booleanBind.js', () => {
261273 }
262274 } ) ; // 224.7
263275
264- it ( '224.8 OUT bind array with boolean data' , async ( ) => {
276+ it ( '224.8 OUT bind array with boolean data' , async function ( ) {
265277 try {
266278 const cls = await conn . getDbObjectClass ( `${ pkgName } .UDT_BOOLEANLIST` ) ;
267279 const arr = new cls ( [ true , false , true , true , false , true , false , true ] ) ;
@@ -277,7 +289,7 @@ describe('224. booleanBind.js', () => {
277289 }
278290 } ) ; // 224.8
279291
280- it ( '224.9 INOUT bind record with boolean data' , async ( ) => {
292+ it ( '224.9 INOUT bind record with boolean data' , async function ( ) {
281293 try {
282294 const cls = await conn . getDbObjectClass ( `${ pkgName } .UDT_DEMORECORD` ) ;
283295 const obj = new cls ( ) ;
0 commit comments