diff --git a/test/create-redis.test.ts b/test/create-redis.test.ts index 558bbef..5adc726 100644 --- a/test/create-redis.test.ts +++ b/test/create-redis.test.ts @@ -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(); +});