@@ -219,13 +219,11 @@ describe('thunks', () => {
219
219
it ( 'call both sendCliClusterCommandAction and sendCliCommandSuccess when response status is successed' , async ( ) => {
220
220
// Arrange
221
221
const command = constants . COMMAND
222
- const data : any [ ] = [
223
- {
224
- response : '(nil)' ,
225
- status : CommandExecutionStatus . Success ,
226
- node : { host : '127.0.0.1' , port : 7002 , slot : 6918 } ,
227
- } ,
228
- ]
222
+ const data : any = {
223
+ response : '(nil)' ,
224
+ status : CommandExecutionStatus . Success ,
225
+ node : { host : '127.0.0.1' , port : 7002 , slot : 6918 } ,
226
+ }
229
227
const responsePayload = { data, status : 200 }
230
228
231
229
apiService . post = vi . fn ( ) . mockResolvedValue ( responsePayload )
@@ -241,13 +239,12 @@ describe('thunks', () => {
241
239
it ( 'call both sendCliClusterCommandAction and sendCliCommandSuccess when response status is fail' , async ( ) => {
242
240
// Arrange
243
241
const command = constants . COMMAND
244
- const data : any [ ] = [
245
- {
246
- response : null ,
247
- status : CommandExecutionStatus . Success ,
248
- node : { host : '127.0.0.1' , port : 7002 , slot : 6918 } ,
249
- } ,
250
- ]
242
+ const data : any [ ] = {
243
+ response : null ,
244
+ status : CommandExecutionStatus . Success ,
245
+ node : { host : '127.0.0.1' , port : 7002 , slot : 6918 } ,
246
+ }
247
+
251
248
const responsePayload = { data, status : 200 }
252
249
253
250
apiService . post = vi . fn ( ) . mockResolvedValue ( responsePayload )
0 commit comments