Closed
Description
We have a failing test in https://github.com/hoodiehq/pouchdb-hoodie-api after upgrading to 4.0.2: hoodiehq/pouchdb-hoodie-api#78
I could track down the issue to this
// run with node.js
var PouchDB = require('pouchdb')
var db = new PouchDB('test', {
db: require('memdown')
})
// just to make sure the init of the db is finished properly
// this can be left out, it has no effect in that context
db.info()
.then(function () {
return db.put({
_id: 'cleanTest'
})
})
.then(function () {
console.log('cleanTest created')
return db.destroy()
})
.then(function () {
console.log('db removed')
// PROBLEM:
// this one does never settles settled.
return db.get('cleanTest')
})
.then(function () {
console.log('.then called after db.get("cleanTest")')
})
.catch(function () {
console.log('.catch called after db.get("cleanTest")')
})
It's very odd. The node script ends without either calling neither .then
or .catch
at the end. How is that even possible?