diff --git a/.travis.yml b/.travis.yml index fdae79db..76a66f4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ install: - npm install script: - - npm run lint - npm run test matrix: diff --git a/lib/utils.js b/lib/utils.js index 26e99827..8f1e5a3b 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -8,4 +8,4 @@ function doWhileAsync (conditionFn, iterateFn, callbackFn) { } next() } -module.exports.doWhileAsync = doWhileAsync \ No newline at end of file +module.exports.doWhileAsync = doWhileAsync diff --git a/package.json b/package.json index 3f9dfcef..2628aaa7 100644 --- a/package.json +++ b/package.json @@ -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" } diff --git a/test/pool-test.js b/test/pool-test.js index d2a86d4c..1d992a89 100644 --- a/test/pool-test.js +++ b/test/pool-test.js @@ -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