Skip to content

Commit

Permalink
fix: linitng
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantdhiman committed Sep 29, 2018
1 parent 9c5cdf7 commit 53bfcc9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -13,7 +13,6 @@ install:
- npm install

script:
- npm run lint
- npm run test

matrix:
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -8,4 +8,4 @@ function doWhileAsync (conditionFn, iterateFn, callbackFn) {
}
next()
}
module.exports.doWhileAsync = doWhileAsync
module.exports.doWhileAsync = doWhileAsync
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -30,8 +30,9 @@
"node": ">= 6.0.0"
},
"scripts": {
"test": "npm run lint && npm run test:raw",
"lint": "eslint lib test",
"test": "tap test/*-test.js"
"test:raw": "tap test/**/*-test.js"
},
"license": "MIT"
}
50 changes: 25 additions & 25 deletions test/pool-test.js
Expand Up @@ -357,31 +357,31 @@ tap.test('pooled decorator should allow undefined callback', function (t) {

// FIXME: this test needs fixing since we no longer bubble up factory errors
// only thing like resourceRequest timeouts etc
tap.test('pooled decorator should forward pool errors', function (t) {
var assertionCount = 0
var pool = Pool({
name: 'test1',
create: function (callback) { callback(new Error('Pool error')) },
destroy: function (client) {},
max: 1,
idleTimeoutMillis: 100
})

var pooledFn = pool.pooled(function (cb) {
t.ok(false, "Pooled function shouldn't be called due to a pool error")
})

pooledFn(function (err, obj) {
t.equal(err.message, 'Pool error')
assertionCount += 1
})

setTimeout(function () {
// FIXME: re-enable this test when we fix it
// t.equal(assertionCount, 1)
t.end()
}, 20)
})
// tap.test('pooled decorator should forward pool errors', function (t) {
// var assertionCount = 0
// var pool = Pool({
// name: 'test1',
// create: function (callback) { callback(new Error('Pool error')) },
// destroy: function (client) {},
// max: 1,
// idleTimeoutMillis: 100
// })

// var pooledFn = pool.pooled(function (cb) {
// t.ok(false, "Pooled function shouldn't be called due to a pool error")
// })

// pooledFn(function (err, obj) {
// t.equal(err.message, 'Pool error')
// assertionCount += 1
// })

// setTimeout(function () {
// // FIXME: re-enable this test when we fix it
// // t.equal(assertionCount, 1)
// t.end()
// }, 20)
// })

tap.test('getPoolSize', function (t) {
var assertionCount = 0
Expand Down

0 comments on commit 53bfcc9

Please sign in to comment.