Skip to content

Commit 8b38d9c

Browse files
committed
Refactor tests
1 parent b26ff24 commit 8b38d9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1659
-2848
lines changed

test/binding_buffer_string.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2022, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -31,15 +31,15 @@
3131
*****************************************************************************/
3232
'use strict';
3333

34-
var oracledb = require('oracledb');
35-
var assert = require('assert');
34+
const oracledb = require('oracledb');
35+
const assert = require('assert');
3636
const sql = require('./sqlClone.js');
37-
var dbConfig = require('./dbconfig.js');
37+
const dbConfig = require('./dbconfig.js');
3838

3939
describe('263. binding_buffer_string.js', function() {
40-
var connection = null;
40+
let connection = null;
4141

42-
var proc_blob_in_tab = "BEGIN \n" +
42+
const proc_blob_in_tab = "BEGIN \n" +
4343
" DECLARE \n" +
4444
" e_table_missing EXCEPTION; \n" +
4545
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -56,7 +56,7 @@ describe('263. binding_buffer_string.js', function() {
5656
" ) \n" +
5757
" '); \n" +
5858
"END; ";
59-
var drop_table = "DROP TABLE blob_tab PURGE";
59+
const drop_table = "DROP TABLE blob_tab PURGE";
6060
before('get connection and create table', async function() {
6161
try {
6262
connection = await oracledb.getConnection(dbConfig);

test/binding_defaultBindIn.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -34,10 +34,10 @@
3434
*****************************************************************************/
3535
'use strict';
3636

37-
let oracledb = require('oracledb');
37+
const oracledb = require('oracledb');
3838
const assert = require('assert');
3939
const sql = require('./sqlClone.js');
40-
let dbConfig = require('./dbconfig.js');
40+
const dbConfig = require('./dbconfig.js');
4141

4242
describe('100.binding_defaultBindIn.js', function() {
4343

test/binding_functionBindIn.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -33,11 +33,11 @@
3333
*****************************************************************************/
3434
'use strict';
3535

36-
let oracledb = require('oracledb');
36+
const oracledb = require('oracledb');
3737
const assert = require('assert');
3838
const sql = require('./sqlClone.js');
39-
let dbConfig = require('./dbconfig.js');
40-
let assist = require('./dataTypeAssist.js');
39+
const dbConfig = require('./dbconfig.js');
40+
const assist = require('./dataTypeAssist.js');
4141

4242
describe('99.binding_functionBindIn.js', function() {
4343

test/binding_functionBindInout.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -41,7 +41,7 @@ const assist = require('./dataTypeAssist.js');
4141

4242
describe('95.binding_functionBindInout.js', function() {
4343

44-
var connection = null;
44+
let connection = null;
4545
var executeSql = async function(sql) {
4646
try {
4747
const result = await connection.execute(sql);

test/binding_functionBindOut.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -33,11 +33,11 @@
3333
*****************************************************************************/
3434
'use strict';
3535

36-
let oracledb = require('oracledb');
36+
const oracledb = require('oracledb');
3737
const assert = require('assert');
3838
const sql = require('./sqlClone.js');
39-
let dbConfig = require('./dbconfig.js');
40-
let assist = require('./dataTypeAssist.js');
39+
const dbConfig = require('./dbconfig.js');
40+
const assist = require('./dataTypeAssist.js');
4141

4242
describe('97.binding_functionBindOut.js', function() {
4343

test/binding_procedureBindIn.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -33,11 +33,11 @@
3333
*****************************************************************************/
3434
'use strict';
3535

36-
let oracledb = require('oracledb');
36+
const oracledb = require('oracledb');
3737
const assert = require('assert');
3838
const sql = require('./sqlClone.js');
39-
let dbConfig = require('./dbconfig.js');
40-
let assist = require('./dataTypeAssist.js');
39+
const dbConfig = require('./dbconfig.js');
40+
const assist = require('./dataTypeAssist.js');
4141

4242
describe('93.binding_procedureBindIn.js', function() {
4343

test/binding_procedureBindInout.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -33,11 +33,11 @@
3333
*****************************************************************************/
3434
'use strict';
3535

36-
let oracledb = require('oracledb');
36+
const oracledb = require('oracledb');
3737
const assert = require('assert');
3838
const sql = require('./sqlClone.js');
39-
let dbConfig = require('./dbconfig.js');
40-
let assist = require('./dataTypeAssist.js');
39+
const dbConfig = require('./dbconfig.js');
40+
const assist = require('./dataTypeAssist.js');
4141

4242
describe('94.binding_procedureBindInout.js', function() {
4343

test/binding_procedureBindOut.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -33,11 +33,11 @@
3333
*****************************************************************************/
3434
'use strict';
3535

36-
let oracledb = require('oracledb');
36+
const oracledb = require('oracledb');
3737
const assert = require('assert');
3838
const sql = require('./sqlClone.js');
39-
let dbConfig = require('./dbconfig.js');
40-
let assist = require('./dataTypeAssist.js');
39+
const dbConfig = require('./dbconfig.js');
40+
const assist = require('./dataTypeAssist.js');
4141

4242
describe('96.binding_procedureBindOut.js', function() {
4343

test/blobDMLBindAsBuffer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('82.blobDMLBindAsBuffer.js', function() {
4141
let connection = null;
4242
let insertID = 1; // assume id for insert into db starts from 1
4343

44-
let proc_blob_1 = "BEGIN \n" +
44+
const proc_blob_1 = "BEGIN \n" +
4545
" DECLARE \n" +
4646
" e_table_missing EXCEPTION; \n" +
4747
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -58,7 +58,7 @@ describe('82.blobDMLBindAsBuffer.js', function() {
5858
" ) \n" +
5959
" '); \n" +
6060
"END; ";
61-
let sql2DropTable1 = "DROP TABLE nodb_dml_blob_1 PURGE";
61+
const sql2DropTable1 = "DROP TABLE nodb_dml_blob_1 PURGE";
6262

6363
before(async function() {
6464
connection = await oracledb.getConnection(dbConfig);

test/blobDMLReturningMultipleRowsAsBuffer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -41,7 +41,7 @@ describe('137. blobDMLReturningMultipleRowsAsBuffer.js', function() {
4141
let connection = null;
4242
let tableName = "nodb_dml_blob_137";
4343

44-
let blob_table_create = "BEGIN \n" +
44+
const blob_table_create = "BEGIN \n" +
4545
" DECLARE \n" +
4646
" e_table_missing EXCEPTION; \n" +
4747
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -58,7 +58,7 @@ describe('137. blobDMLReturningMultipleRowsAsBuffer.js', function() {
5858
" ) \n" +
5959
" '); \n" +
6060
"END; ";
61-
let blob_table_drop = "DROP TABLE " + tableName + " PURGE";
61+
const blob_table_drop = "DROP TABLE " + tableName + " PURGE";
6262

6363
before(async function() {
6464
connection = await oracledb.getConnection(dbConfig);

test/blobDMLReturningMultipleRowsAsStream.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -42,7 +42,7 @@ describe('138. blobDMLReturningMultipleRowsAsStream.js', function() {
4242
let connection = null;
4343
let tableName = "nodb_dml_blob_138";
4444

45-
let blob_table_create = "BEGIN \n" +
45+
const blob_table_create = "BEGIN \n" +
4646
" DECLARE \n" +
4747
" e_table_missing EXCEPTION; \n" +
4848
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -59,7 +59,7 @@ describe('138. blobDMLReturningMultipleRowsAsStream.js', function() {
5959
" ) \n" +
6060
" '); \n" +
6161
"END; ";
62-
let blob_table_drop = "DROP TABLE " + tableName + " PURGE";
62+
const blob_table_drop = "DROP TABLE " + tableName + " PURGE";
6363

6464
before(async function() {
6565
connection = await oracledb.getConnection(dbConfig);

test/blobPlsqlBindAsBuffer_bindin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2016, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2016, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -43,7 +43,7 @@ describe('77. blobPlsqlBindAsBuffer_bindin.js', function() {
4343
let connection = null;
4444
let insertID = 1; // assume id for insert into db starts from 1
4545

46-
let proc_blob_in_tab = "BEGIN \n" +
46+
const proc_blob_in_tab = "BEGIN \n" +
4747
" DECLARE \n" +
4848
" e_table_missing EXCEPTION; \n" +
4949
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -62,7 +62,7 @@ describe('77. blobPlsqlBindAsBuffer_bindin.js', function() {
6262
" '); \n" +
6363
"END; ";
6464

65-
let proc_lobs_in_tab = "BEGIN \n" +
65+
const proc_lobs_in_tab = "BEGIN \n" +
6666
" DECLARE \n" +
6767
" e_table_missing EXCEPTION; \n" +
6868
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +

test/blobPlsqlBindAsBuffer_bindinout.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2016, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2016, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -43,7 +43,7 @@ describe('79. blobPlsqlBindAsBuffer_bindinout.js', function() {
4343
let connection = null;
4444
let insertID = 1; // assume id for insert into db starts from 1
4545

46-
let proc_blob_in_tab = "BEGIN \n" +
46+
const proc_blob_in_tab = "BEGIN \n" +
4747
" DECLARE \n" +
4848
" e_table_missing EXCEPTION; \n" +
4949
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -62,7 +62,7 @@ describe('79. blobPlsqlBindAsBuffer_bindinout.js', function() {
6262
" '); \n" +
6363
"END; ";
6464

65-
let proc_lobs_in_tab = "BEGIN \n" +
65+
const proc_lobs_in_tab = "BEGIN \n" +
6666
" DECLARE \n" +
6767
" e_table_missing EXCEPTION; \n" +
6868
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +

test/blobPlsqlBindAsBuffer_bindout.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2016, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2016, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -44,7 +44,7 @@ describe('78. blobPlsqlBindAsBuffer_bindout.js', function() {
4444
let connection = null;
4545
let insertID = 1; // assume id for insert into db starts from 1
4646

47-
let proc_blob_in_tab = "BEGIN \n" +
47+
const proc_blob_in_tab = "BEGIN \n" +
4848
" DECLARE \n" +
4949
" e_table_missing EXCEPTION; \n" +
5050
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -63,7 +63,7 @@ describe('78. blobPlsqlBindAsBuffer_bindout.js', function() {
6363
" '); \n" +
6464
"END; ";
6565

66-
let proc_lobs_in_tab = "BEGIN \n" +
66+
const proc_lobs_in_tab = "BEGIN \n" +
6767
" DECLARE \n" +
6868
" e_table_missing EXCEPTION; \n" +
6969
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +

test/blobStream.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2016, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2016, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -31,16 +31,16 @@
3131
*****************************************************************************/
3232
'use strict';
3333

34-
var oracledb = require('oracledb');
35-
var should = require('should');
36-
var async = require('async');
37-
var dbConfig = require('./dbconfig.js');
38-
var file = require('./file.js');
39-
var sql = require('./sql.js');
40-
var fs = require('fs');
34+
const oracledb = require('oracledb');
35+
const should = require('should');
36+
const async = require('async');
37+
const dbConfig = require('./dbconfig.js');
38+
const file = require('./file.js');
39+
const sql = require('./sql.js');
40+
const fs = require('fs');
4141

4242
describe('127.blobStream.js', function() {
43-
var connection = null;
43+
let connection = null;
4444
var fileRoot = ".";
4545
var insertID = 1;
4646
var inFileName;

test/clobDMLReturningMultipleRowsAsStream.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2022, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -31,18 +31,18 @@
3131
*****************************************************************************/
3232
'use strict';
3333

34-
var oracledb = require('oracledb');
35-
var should = require('should');
36-
var async = require('async');
37-
var dbConfig = require('./dbconfig.js');
38-
var sql = require('./sql.js');
34+
const oracledb = require('oracledb');
35+
const should = require('should');
36+
const async = require('async');
37+
const dbConfig = require('./dbconfig.js');
38+
const sql = require('./sql.js');
3939

4040
describe('135. clobDMLReturningMultipleRowsAsStream.js', function() {
4141

42-
var connection = null;
43-
var tableName = "nodb_dml_clob_135";
42+
let connection = null;
43+
let tableName = "nodb_dml_clob_135";
4444

45-
var clob_table_create = "BEGIN \n" +
45+
const clob_table_create = "BEGIN \n" +
4646
" DECLARE \n" +
4747
" e_table_missing EXCEPTION; \n" +
4848
" PRAGMA EXCEPTION_INIT(e_table_missing, -00942); \n" +
@@ -65,7 +65,7 @@ describe('135. clobDMLReturningMultipleRowsAsStream.js', function() {
6565
" END LOOP; \n" +
6666
" commit; \n" +
6767
"END; ";
68-
var clob_table_drop = "DROP TABLE " + tableName + " PURGE";
68+
const clob_table_drop = "DROP TABLE " + tableName + " PURGE";
6969

7070
before(function(done) {
7171
oracledb.getConnection(dbConfig, function(err, conn) {

0 commit comments

Comments
 (0)