File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
redisinsight/api/src/modules/browser/rejson-rl Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1080,7 +1080,6 @@ describe('JsonService', () => {
1080
1080
describe ( 'arrAppend' , ( ) => {
1081
1081
beforeEach ( ( ) => {
1082
1082
databaseService . get . mockResolvedValue ( mockDatabaseWithModules ) ;
1083
- client . sendCommand . mockReturnValue ( 'OK' ) ;
1084
1083
} ) ;
1085
1084
it ( 'should throw NotFound error when key does not exists' , async ( ) => {
1086
1085
client . sendCommand . mockReturnValue ( 0 ) ;
@@ -1134,6 +1133,10 @@ describe('JsonService', () => {
1134
1133
}
1135
1134
} ) ;
1136
1135
it ( 'should successful modify data' , async ( ) => {
1136
+ client . sendCommand . mockReturnValueOnce ( 'OK' ) ;
1137
+ // JSON.ARRAPEND returns an array of integer replies for each path, the array's new size,
1138
+ // or nil, if the matching JSON value is not an array
1139
+ client . sendCommand . mockReturnValueOnce ( [ 10 ] ) ;
1137
1140
await service . arrAppend ( mockBrowserClientMetadata , {
1138
1141
keyName : testKey ,
1139
1142
path : testPath ,
You can’t perform that action at this time.
0 commit comments