loopback-connector-couchdb2
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,11 @@ | ||
2017-09-26, Version 1.0.3 | ||
========================= | ||
* Update nano version (#36) (Loay) | ||
* remove event listener (#33) (Janny) | ||
* Add stalebot configuration (Kevin Delisle) | ||
2017-08-22, Version 1.0.2 | ||
@@ -2,0 +12,0 @@ ========================= |
@@ -633,3 +633,3 @@ // Copyright IBM Corp. 2017. All Rights Reserved. | ||
debug('CouchDB.prototype.ping results %j %j', err, result); | ||
if (err) cb('ping failed'); | ||
if (err) cb(new Error('ping failed')); | ||
else cb(); | ||
@@ -636,0 +636,0 @@ }); |
{ | ||
"name": "loopback-connector-couchdb2", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"publishConfig": { | ||
@@ -32,3 +32,3 @@ "export-tests": true | ||
"loopback-connector": "^4.0.0", | ||
"nano": "^6.3.0", | ||
"nano": "^6.4.2", | ||
"request": "^2.81.0", | ||
@@ -35,0 +35,0 @@ "strong-globalize": "^2.6.6" |
@@ -7,2 +7,3 @@ // Copyright IBM Corp. 2017. All Rights Reserved. | ||
'use strict'; | ||
var should = require('should'); | ||
@@ -20,4 +21,15 @@ if (!process.env.COUCHDB2_TEST_SKIP_INIT) { | ||
it('returns true', function(done) { | ||
db.once('connected', function() { | ||
db.ping(done); | ||
db.ping(done); | ||
}); | ||
}); | ||
context('with an invalid connection', function() { | ||
it('returns error with fake url', function(done) { | ||
var fakeConfig = { | ||
url: 'http://fake:foo@localhost:4', | ||
}; | ||
var fakeDB = global.getDataSource(fakeConfig); | ||
fakeDB.ping(function(err) { | ||
should.exist(err); | ||
err.message.should.equal('ping failed'); | ||
done(); | ||
}); | ||
@@ -24,0 +36,0 @@ }); |
187136
50
4659
Updatednano@^6.4.2