From bab153ebfc50a65e6114b4ab6cbf6053d6f37178 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sun, 9 Feb 2025 19:38:27 +0100 Subject: [PATCH] fix close and add assertion --- index.js | 2 ++ test/basic.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0029a439..9a8081e1 100644 --- a/index.js +++ b/index.js @@ -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() diff --git a/test/basic.js b/test/basic.js index be7e67d4..f4f28f50 100644 --- a/test/basic.js +++ b/test/basic.js @@ -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)