Skip to content

Commit

Permalink
fix close and add assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Feb 9, 2025
1 parent 41f4ca9 commit bab153e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ module.exports = class Autobase extends ReadyResource {
await this._wakeup.close()

if (this._hasClose) await this._handlers.close(this.view)
if (this.applyView) await this.applyView.close()

await this._viewStore.close()
await this.corePool.clear()
await this.store.close()
Expand Down
2 changes: 1 addition & 1 deletion test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ test('basic - compare views', async t => {

const [a, b] = bases
await addWriter(a, b)

t.pass('added writer')
await confirm(bases)

for (let i = 0; i < 6; i++) await bases[i % 2].append('msg' + i)
Expand Down

0 comments on commit bab153e

Please sign in to comment.