mirror of
https://github.com/denoland/deno.git
synced 2024-12-11 10:07:54 -05:00
14 lines
392 B
TypeScript
14 lines
392 B
TypeScript
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||
|
import { assertEquals, assertFalse } from "./test_util.ts";
|
||
|
|
||
|
Deno.test({}, async function queueTestDbClose() {
|
||
|
const db: Deno.Kv = await Deno.openKv(":memory:");
|
||
|
db.close();
|
||
|
try {
|
||
|
await db.listenQueue(() => {});
|
||
|
assertFalse(false);
|
||
|
} catch (e) {
|
||
|
assertEquals(e.message, "already closed");
|
||
|
}
|
||
|
});
|