Skip to content

Commit

Permalink
test: consolidated tests and added npm test script
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-page committed Jun 9, 2016
1 parent e1f2e62 commit de30465
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@
"bugs": {
"url": "https://github.com/pekim/tedious-connection-pool/issues"
},
"homepage": "https://github.com/pekim/tedious-connection-pool"
"homepage": "https://github.com/pekim/tedious-connection-pool",
"scripts": {
"test": "node_modules/.bin/mocha test/test.js"
}
}
12 changes: 0 additions & 12 deletions test/naming.test.js

This file was deleted.

21 changes: 21 additions & 0 deletions test/connection-pool.test.js → test/test.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var assert = require('assert');
var Request = require('tedious').Request;
var ConnectionPool = require('../lib/connection-pool');
var Connection = require('tedious').Connection;

var connectionConfig = {
userName: 'test',
Expand Down Expand Up @@ -32,7 +33,27 @@ ALTER ROLE SQLAgentUserRole ADD MEMBER test
ALTER LOGIN test DISABLE
*/

describe('Name Collision', function () {

it('release', function () {
assert(!Connection.prototype.release);

var con = new Connection({});
assert(!con.release);
con.close();
});

it('pool', function () {
assert(!Connection.prototype.pool);

var con = new Connection({});
assert(!con.pool);
con.close();
});
});

describe('ConnectionPool', function () {

it('min', function (done) {
this.timeout(10000);

Expand Down

0 comments on commit de30465

Please sign in to comment.