pouchdb-hoodie-api
pouchdb-hoodie-api copied to clipboard
Tests fail with [email protected]
follow up for https://github.com/hoodiehq/pouchdb-hoodie-api/pull/75#issuecomment-139851044
Just checked it locally and could reproduce it with [email protected], but not with 4.0.1. @nickcolley are you looking into this already? It must have be something with the db.destroy() call here: https://github.com/hoodiehq/pouchdb-hoodie-api/blob/master/clear.js#L11
fyi: https://github.com/pouchdb/pouchdb/issues/4339
@gr2m think it's todo with the stateless constructor but yeah I ran into the same thing.
Okay, so a way around this would be to re-initialize the db instance on destroy. In the hoodie API, we don't have the option to manually re-initialize the hoodie.store API, so it must happen auto-magically :tm:
No idea how though
Is there a an alternative to db.destroy without performance issues in PouchDB?
We have:
- https://github.com/marten-de-vries/pouchdb-erase - Loops over all docs and deletes them (Don't think this'll work)
- https://github.com/pouchdb/pouchdb/issues/802 - Purge, not currently implemented but a highly requested feature, this is what I think hoodie needs for a non-hacky solution.
Unless we can implement purge I'd think we'd have to re instantiate the database ourselves.
Okay, we throw an error in PouchDB now, so this will mean this test wont hang any more.
could you check locally? Is the new PouchDB version out yet?
No, it's not released yet. But 5.3.0 should have the fix.