Skip to content

Commit 6e8f6e1

Browse files
Update test/storage/store.test.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 98b220e commit 6e8f6e1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/storage/store.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ describe('Store', () => {
7373

7474
it('should reject writes in read-only mode', () => {
7575
const readOnlyStore = new Store(testDir, embedder, { readOnly: true });
76-
expect(() => readOnlyStore.addDoc('test-lib', [])).toThrow(/read-only mode/);
77-
readOnlyStore.close();
76+
try {
77+
expect(() => readOnlyStore.addDoc('test-lib', [])).toThrow(/read-only mode/);
78+
} finally {
79+
readOnlyStore.close();
80+
}
7881
});
7982
});
8083

0 commit comments

Comments
 (0)