Skip to content

Commit 8b38d9c

Browse files
committed
Refactor tests
1 parent b26ff24 commit 8b38d9c

File tree

70 files changed

+1659
-2848
lines changed

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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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);

0 commit comments

Comments
 (0)