diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/kv_test.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cli/tests/unit/kv_test.ts b/cli/tests/unit/kv_test.ts index c50e52c52..6ca9f2afc 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: "openKv :memory: no permissions", + name: "kv :memory: no permissions", permissions: {}, async fn() { - const db = await Deno.openKv(":memory:"); + const db = await Deno.kv(":memory:"); await db.close(); }, }); Deno.test({ - name: "openKv invalid filenames", + name: "kv invalid filenames", permissions: {}, async fn() { await assertRejects( - async () => await Deno.openKv(""), + async () => await Deno.kv(""), TypeError, "Filename cannot be empty", ); await assertRejects( - async () => await Deno.openKv(":foo"), + async () => await Deno.kv(":foo"), TypeError, "Filename cannot start with ':' unless prefixed with './'", ); @@ -37,9 +37,7 @@ function dbTest(name: string, fn: (db: Deno.Kv) => Promise<void>) { Deno.test({ name, async fn() { - const db: Deno.Kv = await Deno.openKv( - ":memory:", - ); + const db: Deno.Kv = await Deno.kv(":memory:"); try { await fn(db); } finally { |