summaryrefslogtreecommitdiff
path: root/cli/tests/unit
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2023-03-22 15:23:36 -0400
committerGitHub <noreply@github.com>2023-03-22 20:23:36 +0100
commitf9c8d98b776083525a41f37ebfd86a4a4a288c43 (patch)
treefe96f0affd7c923ede54acd2b969e5c2e4089afd /cli/tests/unit
parent47aa58c72168055047151927946b81085e4ea4cd (diff)
Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362)
This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74.
Diffstat (limited to 'cli/tests/unit')
-rw-r--r--cli/tests/unit/kv_test.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/tests/unit/kv_test.ts b/cli/tests/unit/kv_test.ts
index 6ca9f2afc..c50e52c52 100644
--- a/cli/tests/unit/kv_test.ts
+++ b/cli/tests/unit/kv_test.ts
@@ -8,25 +8,25 @@ import {
} from "./test_util.ts";
Deno.test({
- name: "kv :memory: no permissions",
+ name: "openKv :memory: no permissions",
permissions: {},
async fn() {
- const db = await Deno.kv(":memory:");
+ const db = await Deno.openKv(":memory:");
await db.close();
},
});
Deno.test({
- name: "kv invalid filenames",
+ name: "openKv invalid filenames",
permissions: {},
async fn() {
await assertRejects(
- async () => await Deno.kv(""),
+ async () => await Deno.openKv(""),
TypeError,
"Filename cannot be empty",
);
await assertRejects(
- async () => await Deno.kv(":foo"),
+ async () => await Deno.openKv(":foo"),
TypeError,
"Filename cannot start with ':' unless prefixed with './'",
);
@@ -37,7 +37,9 @@ function dbTest(name: string, fn: (db: Deno.Kv) => Promise<void>) {
Deno.test({
name,
async fn() {
- const db: Deno.Kv = await Deno.kv(":memory:");
+ const db: Deno.Kv = await Deno.openKv(
+ ":memory:",
+ );
try {
await fn(db);
} finally {