Skip to content

Commit 6738443

Browse files
authored
sqlite - fix: updating tests to handle the close correctly (#1415)
1 parent 1832c63 commit 6738443

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/sqlite/test/test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ test.it('close connection successfully', async t => {
115115
await keyv.set('foo', 'bar');
116116
t.expect(await keyv.get('foo')).toBe('bar');
117117
await keyv.disconnect();
118-
try {
119-
await keyv.get('foo');
120-
t.expect.fail();
121-
} catch {
122-
t.expect(true).toBeTruthy();
123-
}
118+
await t.expect(async () => keyv.get('foo')).rejects.toThrow();
124119
});
125120

126121
test.it('handling namespaces with multiple keyv instances', async t => {

0 commit comments

Comments
 (0)