Skip to content

Commit

Permalink
test: scoped store API to work after reset()
Browse files Browse the repository at this point in the history
reproduces #149
  • Loading branch information
gr2m committed Apr 26, 2017
1 parent f2ca074 commit a4c5f94
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/specs/reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,26 @@ test('scoped store calls should work after reset (hoodiehq/hoodie#612)', functio

.catch(t.error)
})

test('scoped store APIs work after reset (hoodiehq/hoodie-store-client#149)', function (t) {
t.plan(1)

var store = new Store('test-db-reset', {
PouchDB: PouchDB,
remote: 'test-db-reset'
})

var itemStore = store.withIdPrefix('item/')

store.reset()

.then(function () {
return itemStore.findAll()
})

.then(function () {
t.pass('ok')
})

.catch(t.error)
})

0 comments on commit a4c5f94

Please sign in to comment.