@@ -35,6 +35,7 @@ describe('RejsonRlKeyInfoStrategy', () => {
35
35
36
36
describe ( 'getInfo' , ( ) => {
37
37
const key = getKeyInfoResponse . name ;
38
+ const path = '.' ;
38
39
beforeEach ( ( ) => {
39
40
when ( mockStandaloneRedisClient . sendPipeline )
40
41
. calledWith ( [
@@ -47,13 +48,13 @@ describe('RejsonRlKeyInfoStrategy', () => {
47
48
] ) ;
48
49
when ( mockStandaloneRedisClient . sendCommand )
49
50
. calledWith (
50
- [ BrowserToolRejsonRlCommands . JsonType , key ] ,
51
+ [ BrowserToolRejsonRlCommands . JsonType , key , path ] ,
51
52
{ replyEncoding : 'utf8' } ,
52
53
)
53
54
. mockResolvedValue ( 'object' ) ;
54
55
when ( mockStandaloneRedisClient . sendCommand )
55
56
. calledWith (
56
- [ BrowserToolRejsonRlCommands . JsonObjLen , key ] ,
57
+ [ BrowserToolRejsonRlCommands . JsonObjLen , key , path ] ,
57
58
{ replyEncoding : 'utf8' } ,
58
59
)
59
60
. mockResolvedValue ( 10 ) ;
@@ -70,13 +71,13 @@ describe('RejsonRlKeyInfoStrategy', () => {
70
71
it ( 'should return appropriate value for key that store string' , async ( ) => {
71
72
when ( mockStandaloneRedisClient . sendCommand )
72
73
. calledWith (
73
- [ BrowserToolRejsonRlCommands . JsonType , key ] ,
74
+ [ BrowserToolRejsonRlCommands . JsonType , key , path ] ,
74
75
{ replyEncoding : 'utf8' } ,
75
76
)
76
77
. mockResolvedValue ( 'string' ) ;
77
78
when ( mockStandaloneRedisClient . sendCommand )
78
79
. calledWith (
79
- [ BrowserToolRejsonRlCommands . JsonStrLen , key ] ,
80
+ [ BrowserToolRejsonRlCommands . JsonStrLen , key , path ] ,
80
81
{ replyEncoding : 'utf8' } ,
81
82
)
82
83
. mockResolvedValue ( 10 ) ;
@@ -92,13 +93,13 @@ describe('RejsonRlKeyInfoStrategy', () => {
92
93
it ( 'should return appropriate value for key that store array' , async ( ) => {
93
94
when ( mockStandaloneRedisClient . sendCommand )
94
95
. calledWith (
95
- [ BrowserToolRejsonRlCommands . JsonType , key ] ,
96
+ [ BrowserToolRejsonRlCommands . JsonType , key , path ] ,
96
97
{ replyEncoding : 'utf8' } ,
97
98
)
98
99
. mockResolvedValue ( 'array' ) ;
99
100
when ( mockStandaloneRedisClient . sendCommand )
100
101
. calledWith (
101
- [ BrowserToolRejsonRlCommands . JsonArrLen , key ] ,
102
+ [ BrowserToolRejsonRlCommands . JsonArrLen , key , path ] ,
102
103
{ replyEncoding : 'utf8' } ,
103
104
)
104
105
. mockResolvedValue ( 10 ) ;
@@ -114,7 +115,7 @@ describe('RejsonRlKeyInfoStrategy', () => {
114
115
it ( 'should return appropriate value for key that store not iterable type' , async ( ) => {
115
116
when ( mockStandaloneRedisClient . sendCommand )
116
117
. calledWith (
117
- [ BrowserToolRejsonRlCommands . JsonType , key ] ,
118
+ [ BrowserToolRejsonRlCommands . JsonType , key , path ] ,
118
119
{ replyEncoding : 'utf8' } ,
119
120
)
120
121
. mockResolvedValue ( 'boolean' ) ;
0 commit comments