mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
15fce5b290
Part of #25162 Closes #11826
13 lines
403 B
TypeScript
13 lines
403 B
TypeScript
// Copyright 2018-2024 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 as Error).message, "already closed");
|
|
}
|
|
});
|