Skip to content

Commit 91648e5

Browse files
committed
Test refactoring
1 parent 1d4bbec commit 91648e5

Some content is hidden

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

61 files changed

+5660
-7475
lines changed

test/accessPropertiesOnClosedObjects.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*
18-
* The node-oracledb test suite uses 'mocha', 'should' and 'async'.
18+
* The node-oracledb test suite uses 'mocha'.
1919
* See LICENSE.md for relevant licenses.
2020
*
2121
* NAME
@@ -29,20 +29,21 @@
2929

3030

3131
const oracledb = require('oracledb');
32-
const should = require('should');
32+
const assert = require('assert');
3333
const dbconfig = require('./dbconfig.js');
3434

3535
describe('223. accessPropertiesOnClosedObjects.js', () => {
3636

3737
it('223.1 access properties of closed Connection object', async () => {
3838
try {
3939
const conn = await oracledb.getConnection(dbconfig);
40+
assert(conn);
4041
await conn.close();
4142

42-
let closedObjProp = conn.oracleServerVersion;
43-
should.not.exist(closedObjProp);
43+
const closedObjProp = conn.oracleServerVersion;
44+
assert.ifError(closedObjProp);
4445
} catch (err) {
45-
should.not.exist(err);
46+
assert.fail(err);
4647
}
4748
}); // 223.1
4849

@@ -53,14 +54,14 @@ describe('223. accessPropertiesOnClosedObjects.js', () => {
5354
const Lob = await conn.createLob(oracledb.DB_TYPE_BLOB);
5455

5556
await Lob.close();
56-
should.strictEqual(Lob.type, oracledb.DB_TYPE_BLOB);
57-
should.strictEqual(Lob.length, 0);
57+
assert.strictEqual(Lob.type, oracledb.DB_TYPE_BLOB);
58+
assert.strictEqual(Lob.length, 0);
5859

5960
await conn.close();
60-
should.strictEqual(Lob.type, oracledb.DB_TYPE_BLOB);
61-
should.strictEqual(Lob.length, 0);
61+
assert.strictEqual(Lob.type, oracledb.DB_TYPE_BLOB);
62+
assert.strictEqual(Lob.length, 0);
6263
} catch (err) {
63-
should.not.exist(err);
64+
assert.fail(err);
6465
}
6566
}); // 223.2
6667
});

0 commit comments

Comments
 (0)