Skip to content

Commit

Permalink
test: add error handling test
Browse files Browse the repository at this point in the history
  • Loading branch information
kane50613 committed Nov 1, 2024
1 parent d6c177d commit cef48bd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/create-redis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,13 @@ test("full-text-search", async () => {

await redis.close();
});

test("error-handling", async () => {
const redis = createRedis("redis://localhost:6379/0");

assert.rejects(redis.sendOnce("MY_GO"), {
message: "ERR unknown command 'MY_GO', with args beginning with: ",
});

await redis.close();
});

0 comments on commit cef48bd

Please sign in to comment.