Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idb-connector

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idb-connector - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

5

CHANGELOG.md
# idb-connector changelog
## 1.1.7
- Fixed the connection failure(#52) with user/password provided
- Updated some test cases
## 1.1.6

@@ -4,0 +9,0 @@

2

package.json
{
"name": "idb-connector",
"version": "1.1.6",
"version": "1.1.7",
"description": "A Node.js DB2 driver for IBM i",

@@ -5,0 +5,0 @@ "main": "lib/db2a.js",

const expect = require('chai').expect;
const db2a = require('../lib/db2a');
const {dbconn} = db2a;
const username = process.env.DBNAME;
const password = process.env.DBPWD;

@@ -34,2 +36,29 @@ // Test connection Class

});
if(username && password) {
it('disconnects an exsisting connection to the datbase with user/pwd.', () => {
// Test with username/password
let connection = new dbconn(),
result = connection.conn("*LOCAL", username, password);
result = connection.isConnected();
expect(result).to.be.true;
result = connection.disconn();
expect(result).to.be.true;
result = connection.isConnected();
expect(result).to.be.false;
// Test the callback style
connection.conn("*LOCAL", username, password, () => {
result = connection.isConnected();
expect(result).to.be.true;
result = connection.disconn();
expect(result).to.be.true;
result = connection.isConnected();
expect(result).to.be.false;
});
});
}
});

@@ -120,3 +149,3 @@

expect(result).to.equal(null);
} catch (e) { console.error(e); }
} catch (e) { }
});

@@ -123,0 +152,0 @@ });

@@ -6,2 +6,3 @@ # How to Test

For example when inside the test directory you can run `npm test connectionTest`.
All Tests can be run by `npm test`.
All Tests can be run by `npm test`.
Test connection with user name & password by `DBNAME=yourname DBPWD=password npm test`.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc