mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 17:19:06 -05:00
fix(kv): assertReject should always be awaited (#19612)
This commit is contained in:
parent
f372688f22
commit
805c922a5c
1 changed files with 7 additions and 7 deletions
|
@ -443,7 +443,7 @@ dbTest("atomic mutation type=sum wrap around", async (db) => {
|
|||
|
||||
dbTest("atomic mutation type=sum wrong type in db", async (db) => {
|
||||
await db.set(["a"], 1);
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => {
|
||||
await db.atomic()
|
||||
.mutate({ key: ["a"], value: new Deno.KvU64(1n), type: "sum" })
|
||||
|
@ -456,7 +456,7 @@ dbTest("atomic mutation type=sum wrong type in db", async (db) => {
|
|||
|
||||
dbTest("atomic mutation type=sum wrong type in mutation", async (db) => {
|
||||
await db.set(["a"], new Deno.KvU64(1n));
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => {
|
||||
await db.atomic()
|
||||
// @ts-expect-error wrong type is intentional
|
||||
|
@ -497,7 +497,7 @@ dbTest("atomic mutation type=min no exists", async (db) => {
|
|||
|
||||
dbTest("atomic mutation type=min wrong type in db", async (db) => {
|
||||
await db.set(["a"], 1);
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => {
|
||||
await db.atomic()
|
||||
.mutate({ key: ["a"], value: new Deno.KvU64(1n), type: "min" })
|
||||
|
@ -510,7 +510,7 @@ dbTest("atomic mutation type=min wrong type in db", async (db) => {
|
|||
|
||||
dbTest("atomic mutation type=min wrong type in mutation", async (db) => {
|
||||
await db.set(["a"], new Deno.KvU64(1n));
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => {
|
||||
await db.atomic()
|
||||
// @ts-expect-error wrong type is intentional
|
||||
|
@ -551,7 +551,7 @@ dbTest("atomic mutation type=max no exists", async (db) => {
|
|||
|
||||
dbTest("atomic mutation type=max wrong type in db", async (db) => {
|
||||
await db.set(["a"], 1);
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => {
|
||||
await db.atomic()
|
||||
.mutate({ key: ["a"], value: new Deno.KvU64(1n), type: "max" })
|
||||
|
@ -564,7 +564,7 @@ dbTest("atomic mutation type=max wrong type in db", async (db) => {
|
|||
|
||||
dbTest("atomic mutation type=max wrong type in mutation", async (db) => {
|
||||
await db.set(["a"], new Deno.KvU64(1n));
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => {
|
||||
await db.atomic()
|
||||
// @ts-expect-error wrong type is intentional
|
||||
|
@ -1168,7 +1168,7 @@ dbTest("operation size limit", async (db) => {
|
|||
const res2 = await collect(db.list({ prefix: ["a"] }, { batchSize: 1000 }));
|
||||
assertEquals(res2.length, 0);
|
||||
|
||||
assertRejects(
|
||||
await assertRejects(
|
||||
async () => await collect(db.list({ prefix: ["a"] }, { batchSize: 1001 })),
|
||||
TypeError,
|
||||
"too many entries (max 1000)",
|
||||
|
|
Loading…
Reference in a new issue