From f9c8d98b776083525a41f37ebfd86a4a4a288c43 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 22 Mar 2023 15:23:36 -0400 Subject: Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362) This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74. --- cli/tests/unit/kv_test.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'cli/tests') 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) { 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 { -- cgit v1.2.3