1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-10 08:09:06 -05:00
denoland-deno/tests/unit/kv_queue_test.ts
2024-12-31 19:12:39 +00:00

13 lines
388 B
TypeScript

// Copyright 2018-2025 the Deno authors. 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 as Error).message, "Queue already closed");
}
});