Comparing version 5.1.4 to 5.2.0
@@ -522,3 +522,5 @@ 'use strict'; | ||
process.nextTick(() => each(Boom.internal('Simulated database error'))); | ||
const error = Boom.internal('Simulated database error'); | ||
error.flags = Hoek.applyToDefaults({ willReconnect: true, disconnected: true }, options.flags || {}); | ||
process.nextTick(() => each(error)); | ||
return callback(null, { close: Hoek.ignore }); | ||
@@ -525,0 +527,0 @@ }; |
{ | ||
"name": "penseur", | ||
"description": "Lightweight RethinkDB wrapper", | ||
"version": "5.1.4", | ||
"version": "5.2.0", | ||
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/hueniverse/penseur", |
@@ -918,2 +918,3 @@ 'use strict'; | ||
expect(err).to.exist(); | ||
expect(err.flags.willReconnect).to.be.true(); | ||
done(); | ||
@@ -928,2 +929,25 @@ }; | ||
}); | ||
it('simulates a changes update error (flags)', (done) => { | ||
const db = new Penseur.Db('penseurtest', { host: 'localhost', port: 28015, test: true }); | ||
db.establish(['test'], (err) => { | ||
expect(err).to.not.exist(); | ||
db.disable('test', 'changes', { updates: true, flags: { willReconnect: false } }); | ||
const each = (err, update) => { | ||
expect(err).to.exist(); | ||
expect(err.flags.willReconnect).to.be.false(); | ||
done(); | ||
}; | ||
db.test.changes({ a: 1 }, each, (err) => { | ||
expect(err).to.not.exist(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -930,0 +954,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171595
4109