summaryrefslogtreecommitdiff
path: root/cli/tests/unit/kv_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/kv_test.ts')
-rw-r--r--cli/tests/unit/kv_test.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/tests/unit/kv_test.ts b/cli/tests/unit/kv_test.ts
index 62b53fc55..3081917da 100644
--- a/cli/tests/unit/kv_test.ts
+++ b/cli/tests/unit/kv_test.ts
@@ -46,7 +46,7 @@ Deno.test({
},
});
-function dbTest(name: string, fn: (db: Deno.Kv) => Promise<void>) {
+function dbTest(name: string, fn: (db: Deno.Kv) => Promise<void> | void) {
Deno.test({
name,
// https://github.com/denoland/deno/issues/18363
@@ -58,7 +58,7 @@ function dbTest(name: string, fn: (db: Deno.Kv) => Promise<void>) {
try {
await fn(db);
} finally {
- await db.close();
+ db.close();
}
},
});
@@ -1750,3 +1750,9 @@ Deno.test({
}
},
});
+
+dbTest("atomic operation is exposed", (db) => {
+ assert(Deno.AtomicOperation);
+ const ao = db.atomic();
+ assert(ao instanceof Deno.AtomicOperation);
+});