1- import { BulkReply , ErrorReplyError , parseURL } from "../mod.ts" ;
1+ import { BulkReply , ErrorReplyError , parseURL , replyTypes } from "../mod.ts" ;
22import {
33 assert ,
44 assertEquals ,
@@ -20,21 +20,21 @@ suite.test("simple, string, and integer replies", async () => {
2020 // simple string
2121 {
2222 const reply = await client . executor . exec ( "SET" , "key" , "a" ) ;
23- assertEquals ( reply . type , "simple string" ) ;
23+ assertEquals ( reply . type , replyTypes . SimpleString ) ;
2424 assertEquals ( reply . value ( ) , "OK" ) ;
2525 }
2626
2727 // bulk string
2828 {
2929 const reply = await client . executor . exec ( "GET" , "key" ) ;
30- assertEquals ( reply . type , "bulk string" ) ;
30+ assertEquals ( reply . type , replyTypes . BulkString ) ;
3131 assertEquals ( reply . value ( ) , "a" ) ;
3232 }
3333
3434 // integer
3535 {
3636 const reply = await client . executor . exec ( "EXISTS" , "key" ) ;
37- assertEquals ( reply . type , "integer" ) ;
37+ assertEquals ( reply . type , replyTypes . Integer ) ;
3838 assertEquals ( reply . value ( ) , 1 ) ;
3939 }
4040} ) ;
@@ -43,7 +43,7 @@ suite.test("get the raw data as Uint8Array", async () => {
4343 const encoder = new TextEncoder ( ) ;
4444 await client . set ( "key" , encoder . encode ( "hello" ) ) ;
4545 const reply = await client . executor . exec ( "GET" , "key" ) ;
46- assertEquals ( reply . type , "bulk string" ) ;
46+ assertEquals ( reply . type , replyTypes . BulkString ) ;
4747 assertEquals ( ( reply as BulkReply ) . buffer ( ) , encoder . encode ( "hello" ) ) ;
4848} ) ;
4949
0 commit comments