Skip to content

Commit cef48bd

Browse files
committed
test: add error handling test
1 parent d6c177d commit cef48bd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/create-redis.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,13 @@ test("full-text-search", async () => {
8585

8686
await redis.close();
8787
});
88+
89+
test("error-handling", async () => {
90+
const redis = createRedis("redis://localhost:6379/0");
91+
92+
assert.rejects(redis.sendOnce("MY_GO"), {
93+
message: "ERR unknown command 'MY_GO', with args beginning with: ",
94+
});
95+
96+
await redis.close();
97+
});

0 commit comments

Comments
 (0)